Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dll to lib

Status
Not open for further replies.

Rhaegar

Programmer
Sep 28, 2002
19
US
Hi,

I'm using Visual Studio 6.0 and would like to import a lib from a dll file. Is there any way to do this with VS? Thanks.
 
Normally a .lib file is created during build of the corresponding .dll file.

If you only have a dll-file I think you have a problem.

You can see which functions are exported from the dll, by executing the dumpbin utillity - this might give you an idea about what's 'inside' the dll. :

dumpbin /EXPORTS xxxxx.dll
/JOlesen
 
You can use this to use a Funktion from DLL on-line:
typedef BOOL (WINAPI *MYFUNKTIONPTR)(int Argument); //Or another type You use
HMODULE hMod = LoadLibrary("yourunknown.dll");
if(hMod) {
MYFUNKTIONPTR fkn = (MYFUNKTIONPTR)GetProcAddress(hMod, "FunktionName));
if(fkn) {
//Such funktion is in File - You can use it
if(fkn(1)) { //Call funktion
}
else {
}
}
FreeLibrary( hMod);
}

You can find out, wich Funktions are in a dll and see Assembler code of them with Programm PCHacker.
You can download this Program from:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top