Archived

This topic is now archived and is closed to further replies.

Oscar A

DLL and LIB

Recommended Posts

Oscar A    122
Hello friends I have a problem. I am doing some coding in OpenGL and i include opengl32.lib. I want to use the lib-file for my 3d-card. I dont have a lib file for it but could i convert mygrafcard.dll to mygrafcard.lib ???? Cowboy Happy Hacking. Don''t forget to eat and sleep

Share this post


Link to post
Share on other sites
Oscar A    122
I am not sure what u mean ?

What i want to do is to use the opengl drivers for my old voodoo 2 card instead of opengl32.lib.

But i dont have the lib-file for it and i want to know if i could convert the *.dll to a *.lib and use it instead of opengl32.lib.

Cowboy

Happy Hacking. Don''t forget to eat and sleep

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Well, you could load them runtime if you knew how the functions were declared:

Use dumpbin to dump all of the exported functions out of the dll.

Look up the functions at the site where the driver was developed (may actually have an SDK to avoid all this).

use typedef to prototype the exported functions, and load them runtime:

typedef void(*MyProc)(void);

HMODULE handle;
handle = LoadLibrary("blabla.dll";
//Dumpbin gives you names of exported functions
MyProc proc = (myproc)GetProcaddress("HelloWorld";
FreeLibrary(handle);
proc();

Share this post


Link to post
Share on other sites