Very Important Error !!!!! for me

DLL 'C:\Users\GMMMUH03\Desktop\opencascade\OpenCASCADE_src \OpenCASCADE6.3.0\samples\standard\CSharp\IE\bin\Debug\OCC.dll' is attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.

and when I not throw loder lock ...then

Could not load file or assembly 'shell.dll' or one of its dependencies. Exception from HRESULT: 0xE0434352.
gives this error at this time. but there are references index shell.dll
What should I do??????????????

Alena's picture

Try this. In the file OCC.cpp add #pragma unmanaged before main-function, set /clr:oldsyntax option in OCC and shell projects.