Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
Calling managed 'entrypoint': Managed code may not be run under loader lock, including the DLL entrypoint and calls reached from the DLL entrypoint
Remarks
The compiler found a (probable) DLL entry point compiled to MSIL. Because of potential problems with loading a DLL whose entry point has been compiled to MSIL, you are strongly discouraged from compiling a DLL entry point function to MSIL.
For more information, see Initialization of Mixed Assemblies and Linker Tools Error LNK1306.
To correct this error
Do not compile the module with /clr.
Mark the entry point function with
#pragma unmanaged.
Example
The following example generates C4747.
// C4747.cpp
// compile with: /clr /c /W1
// C4747 expected
#include <windows.h>
// Uncomment the following line to resolve.
// #pragma unmanaged
BOOL WINAPI DllMain(HANDLE hInstance, ULONG Command, LPVOID Reserved) {
return TRUE;
}