When I have the library in the same folder as app I can simply:
[DllImport("kernel32")]
public extern static IntPtr LoadLibrary(string librayName);
IntPtr iq_dll = LoadLibrary("IQPokyd.dll");
I also have this in my app.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="plugins;" />
</assemblyBinding>
</runtime>
</configuration>
I'm able to load this library. Problem is that it is using some config files which needs to be in app run directory. Is there some possibility how to tell the library that files it needs are in the same folder as the library?