I am trying to write a COM server and client. When I call CoCreateInstance()
, COM Engine is expected to call DllGetClassObject()
, but it seems it is never called(I have put simple message box before all other functionality, so I am sure it is not called).
On further inspection, I found that it is not exported. I tested it using Dumpbin /EXPORTS
My def file is
LIBRARY ClassFactoryServer
EXPORTS
DllGetClassObject @100 PRIVATE
DllCanUnloadNow @101 PRIVATE
I don't know why these are not exported. I can not use __declspec(dllexport)
for known reason, there is other way of using #pragma
but I am quite ready to write .def
file, but don't know why functions are not getting exported.