Sign in to follow this  
alex_r

LoadLibrary

Recommended Posts

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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this