CoCreateInstance returns E_NOINTERFACE
I have been trying to solve this for quite a while now and still has no clue. I am hoping some COM expert would be able to help me out here.
Basically, I have a COM server, which is an MFC app. The COM server implements a COM component. Below is what the code looks like.
In myapp.cpp, I have:
BOOL CHllwatchApp::InitInstance()
{
// Initialize OLE libraries
if (!AfxOleInit())
{
AfxMessageBox(IDP_OLE_INIT_FAILED);
return FALSE;
}
SCODE sc = ::CoRegisterClassObject( CLSID_HLLWATCH,
&m_xMyClassFactory,
CLSCTX_LOCAL_SERVER,
REGCLS_MULTI_SEPARATE,
&m_dwRegister );
Re: CoCreateInstance returns E_NOINTERFACE
I know this is an old post, but I am running into the exact same problem. How do you go about registering an exe properly? I have tried regsvr /r, but it doesn't seem to correct the problem. Is there an easy way to register an MFC COM executable?
Re: CoCreateInstance returns E_NOINTERFACE
Thanks for responding - I tried this, but it doesn't seem to correct my problem. I will keep trying. I probably should start over in ATL!