Hi.
I have been working 2 days on creating a simple exe COM server, I have test any thing in the web , but still not working! I create a simple object with ATL and register the interface with ATL RegisterClassObjects and RegisterActiveObject, it returns succeed but any clients can't use GetObject method to get the object, but CreateObject works.
here is my project files:
http://www.mediafire.com/?365arde4jyd5v3x
I used this code is main function to register a created instance of my object:
hr = __objMap_CMySimpleObject.RegisterClassObject(CLSCTX_LOCAL_SERVER,ACTIVEOBJECT_STRONG);
and also get instance by this way:
IMySimpleObject *mysim = NULL;
hr = CComCreator<CComObject<CMySimpleObject>>::CreateInstance(NULL,IID_IMySimpleObject,(void**)&mysim);
and registered it with:
hr = RegisterActiveObject(mysim,CLSID_MySimpleObject,ACTIVEOBJECT_STRONG,&res);
but after all this function returns error:
hr = ProgIDFromCLSID(CLSID_MySimpleObject,&pgid);
should I use any ATL macro in my class or do any thing else?
Can anybody help me? I really need it, it's a part of my project.
Any helps would be appreciated.
Thanks.