i need to store variables in a dll, which need to remain there so that they are accessible for other exported functions in the dll to use. It seems that using dllImport will not keep the dll in memory and so these variables are lost once a function call has completed.
What i need is something like loadLibrary() that was avaiable in C++ to use in C# - in relation to the above messages this would be explicit linking. - but basically i want the dll i am using to remain in memory throughout the execution of the program so that all function calls to the dlls functions are to the same instance of the dll.
hope that makes some sense. does anyone know how to do this in C#? thanks