After the migration from X86 to X64 we cant load some C++/CLI Dlls anymore. The Project Setting a die not changed really and also the Source is allmost the same ( just some changes form int to __int64 how can i find out what is the exact Problem. Can i check the dll somehow to find out what is wrong with the Dll.



In our Example the dll i can not load is the is the NmsModelTDotNet.dll

when i debug i have the following call Stack

KernelBase.dll!wil:etails:ebugBreak(void) Unknown
clr.dll!MdaXmlMessage::SendDebugEvent(void) Unknown
clr.dll!MdaXmlMessage::SendEvent(void) Unknown
clr.dll!MdaXmlMessage::SendMessage(void) Unknown
clr.dll!MdaXmlMessage::SendMessagef(int,...) Unknown
clr.dll!MdaLoaderLock::ReportViolation(struct HINSTANCE__ *) Unknown
clr.dll!CanRunManagedCodeRare() Unknown
clr.dll!CorDllMainForThunk(struct HINSTANCE__ *,struct HINSTANCE__ *) Unknown
mscoreei.dll!CorDllMainWorkerForThunk(struct HINSTANCE__ *) Unknown
mscoreei.dll!VTableBootstrapThunkInitHelper() Unknown
mscoreei.dll!VTableBootstrapThunkInitHelperStub() Unknown
> NmsModelTDotNet.dll!ExtRawDllMain(HINSTANCE__ * __formal, unsigned long dwReason, void * __formal) Line 56 C++
[External Code]
NmsModApi.dll!__delayLoadHelper2(const ImgDelayDescr * pidd, __int64(*)() * ppfnIATEntry) Line 296 C++
[External Code]
NmsModApi.dll!APlatformObjects::LoadVendorInternal(const AEnumVendor & eVendor, const AString & sVersion) Line 10187 C++
NmsModApi.dll!APlatformObjects::LoadVendor(const AEnumVendor & eVendor, const AString & sVersion) Line 10152 C++
NmsModApi.dll!APlatformObjects::Initialize(bool bIsSos) Line 10066 C++
Nms.exe!AApp::InitInstance() Line 675 C++
[External Code]
Nms.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 26 C++
[External Code]

the ExRawDllMain is the Default

BOOL WINAPI ExtRawDllMain(HINSTANCE, DWORD dwReason, LPVOID)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
// save critical data pointers before running the constructors
AFX_MODULE_STATE* pModuleState = AfxGetModuleState();
pModuleState->m_pClassInit = pModuleState->m_classList;
pModuleState->m_pFactoryInit = pModuleState->m_factoryList;
pModuleState->m_classList.m_pHead = NULL;
pModuleState->m_factoryList.m_pHead = NULL;
}
return TRUE; // ok
}

from MFC

we do delay load this Dll. But when do not delay load th dlle i have the same problem. It happens just earlier. Whe i try to load the Dll with

LoadLibrary(_T("NmsModelTDotNet.dll"));


i have the same error