CDLLClass* pDLLClass;
HINSTANCE Dll = LoadLibrary("yourdll");
if (Dll)
{
// Get the address of the function.
Load1 = (MyDLLClass *)GetProcAddress(Dll, "NewObj");
// Make sure we have the address then call the function.
if (Load1)
Load1((void**)&pDLLClass);
else
ShowMessage(SysErrorMessage(GetLastError()));
// After we're done with the Dll we have to free it.
//FreeLibrary(Dll);
}
现在你可以取得指向该类的指针pDLLClass.