Nov 4, 2010 at 12:00 PM
Edited Nov 4, 2010 at 12:02 PM
So you're loading an unmanaged plugin into a managed host application an you get a message that you should not attempt to run managed code inside the DllMain function inside the loader lock....?
I have never seen this before. The managed Host application starts as a normal managed application. It side-steps into unmanaged code in order to load the unmanaged plugin using a normal Win32 API method for that: LoadLibrary(A). If I understand it correctly
its during that time that the loader lock is obtained and the DllMain is executed on the plugin. I dont see how this scenario could be a problem, but I am not an expert on this.
To get to the bottom of this you will have to debug and perhaps build sample unmanaged plugin dlls in order to be able to pinpoint the problem. You could start by debugging the Jacobi.Vst.Interop.Host.VstUnmanagedPluginContext class where the loading and
initialization of the unmanaged plugin takes place. It would really help if you would have an unmanaged plugin with this problem for which you also have the source code...
I hope this helps.