Hi,
I have been porting our code to a Visual Studio 2010 compiler. Everything worked okay, except one of our Active X controls fails to register. We have several and the rest of them register without problems, but this one doesn't.
I get error: "The module "xxxxx.ocx" was loaded but the call to DllRegisterServer failed with error code 0x80040200."
This is on Windows
2008 Server Datacenter edition with SP2. This is not an elevation issue as I am running from Elevated command prompt and UAC is off on the machine.
From my debugging, the issue is related to the type library, AfxOleRegisterTypeLib returns 0. But I think the main reason is that AfxGetInstanceHandle() returns NULL.
Any help on this would be appreciated. Thank you.