Hi,
I have a com dll and I am using LoadLibrary function for
loading this dll.
After that I want call a createInstance() function.
To call this function I am using a function ptr that got initialized from GetProcAddress() API.
Here I am facing a problem how to initialize this function pointer for CreateInstance()
All i am doing is.
dll name => MyDll
class name =>MyClass
interface name derived from IDispatch(com interface) ==> IMyClassPtr
long (IMyClassPtr::*CreateInstancePtr)(LPCWSTR *name) = NULL;
HMODULE handleMyDll ;
handleMyDll = LoadLibrary(L"MyDll.dll");
CreateInstancePtr = GetProcAddress( handleMyDll,"MyClass::CreateInstance");
if(CreateInstancePtr == NULL)
-when we call GetProcAddress() function it is giving me an error saying cannot convert.
Can any one tell me the syntax for function pointer or
is any thing wrong in GetProcAddress()
Thanks in Advance