I want to write a class derived from a class in a dll, but I don't want to use .lib file. So How to Explicit import class from dll?
Thanks a lot!
Printable View
I want to write a class derived from a class in a dll, but I don't want to use .lib file. So How to Explicit import class from dll?
Thanks a lot!
HelpHelp
You can dynamically explicit load the dll in run time and no lib is needed.Quote:
Originally posted by Kyliny
HelpHelp
e.g
typedef void (*PExportedFn)(int&, char*);
HMODULE hMod = LoadLibrary("Lib1.dll");
PExportedFn pfnEF = (PExportedFn)GetProcAddress(hMod, "ExportedFn");
// pfnEF will be ur function method in the dll file.
You can reference http://www.codeguru.com/forum/showth...209#post827209 for more information.
Regards,
JamesGoh