LoadLibrary

Started by
0 comments, last by doynax 18 years, 11 months ago
Hi, I'm developing some tests do develop a engine with DX and OGL suport. The idea is simple, two DLLs for the renders DX.dll and OGL.dll and call the DLL with LoadLibrary... But I have some questions about LoadLibrary, I made the dll with VC++, to load the DLL I call the .lib and .h, but with LoadLibrary I don't find how load. Now about DLL, how I export the informations? extern "C++" class __declspec(dllexport)? Thanks
Advertisement
If you're going to link the library in manually with LoadLibrary then there's really no point in exporting entire classes.
Since you'll be importing single functions and calling them through function pointers I suggest that you only export a single C function (there's no need to deal with C++ name mangling), much like COM interfaces.

edit: Oh, and you'll want to use GetProcAddress to get the function's address.

[Edited by - doynax on June 5, 2005 3:22:30 PM]

This topic is closed to new replies.

Advertisement