Debug a Windows CE setup DLL
::GetModuleFileName(g_hInstDLL, szName, nSize);
::MessageBox(hwndParent, szName, _T(“”), MB_OK);
where g_hInstDLL is the handle to the loaded module, usually available in the DLL entry point:
BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
//assign the handle here
g_hInstDLL = (HINSTANCE)hModule;
break;
}
return TRUE;
}
Reference: