Cannot register COM server
-
I have created a com server in a dll and when I attempt to register the server using regsvr32 I recieve an error message stating that the module could not be found. I was wondering if anyone new of the cause for that (I have checked the path and it is correct). Thanks in advance.
-
I have created a com server in a dll and when I attempt to register the server using regsvr32 I recieve an error message stating that the module could not be found. I was wondering if anyone new of the cause for that (I have checked the path and it is correct). Thanks in advance.
Well check following things, 1) Try to load your DLL like ordinary DLL . If loadlibrary does not work out then your DLL is in incorrect . 2)Now next try will be check out wether your DLL is having all basic COM functions needed (exports). Look for MSDN if u dont know the basic COM exports
-
Well check following things, 1) Try to load your DLL like ordinary DLL . If loadlibrary does not work out then your DLL is in incorrect . 2)Now next try will be check out wether your DLL is having all basic COM functions needed (exports). Look for MSDN if u dont know the basic COM exports
Thanks for the information. I got past the cannot find module error but not I am receiving a cannot find DllRegisterServer entry point error. I have tried removing the macros and explicitly defining the function types. I forward defined them like this:
extern "C" __declspec(dllexport) HRESULT STDAPICALLTYPE DllRegisterServer(); extern "C" __declspec(dllexport) HRESULT STDAPICALLTYPE DllUnregisterServer();
The function bodies look like this:extern "C" __declspec(dllexport) HRESULT STDAPICALLTYPE DllRegisterServer() { return RegisterServer(g_hModule, CLSID_Component1, g_szFriendlyName, g_szVerIndProgID, g_szProgID); } //server unregister extern "C" __declspec(dllexport) HRESULT STDAPICALLTYPE DllUnregisterServer() { return UnregisterServer(CLSID_Component1, g_szVerIndProgID, g_szProgID); }
Again thanks for the help.