Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi to all
Thank u very much for giving me valuble suggestions.Actual problem i am having dll that has come with os.And now i have to use that dll into my project. But i don't have the lib file for that DLL.I have searched net lot.But i got clues only creating lib files from dll's in vs2003,2005 and 2008 versions. I need this procedure to be done with vc6. I don't know how to do it.Please help me with this problem.

Thanking u all.
Posted
Updated 4-Jun-10 0:20am
v4
Comments
Moak 2-Jun-10 3:53am    
Updated subject and tags, hope this is what you are looking for.

I think that you are asking about the import library that VC automatically generates for each DLL project and that is required to implicitly link against the DLL...
Unfortunately you can generate it only by compiling the DLL from its source code; if you only have the executable file (i.e. the one with .dll extension), you cannot generate an import library for it and the only method you can use to make calls into the DLL is through LoadLibrary, GetProcAddress and FreeLibrary
 
Share this answer
 
Well your question(s) is/are open to misinterpretation so I will add my two penn'orth. If you mean that you wish to convert a DLL library to a static library then you will either need the source code to do the conversion or write a static library that wraps the DLL; the second option does not appeal. Assuming you have the source code then just change the project type and rebuild; you may also need to modify some definitions and externalisations, but without seeing the headers it's difficult to say more.
 
Share this answer
 
You cannot generate a static library (.lib) from a dynamic link library (.dll). What you can do if you have the source code though is to compile it as a static library instead.

Go to your project properties -> Configuration Properties -> General
In the Configuration Type field set this value to Static Library (.lib)

Note: If you'd like to compile your project as both you can setup different configurations to do this. This is very commonly done for 3rd party library developers to offer the most flexibility.
 
Share this answer
 
v5
C++
Program Files\Microsoft Visual Studio\VC98\Bin

run cmd
then type  VCVARS32.BAT

//use this command to look your dll's function name
dumpbin -exports DLL1.dll

//use this command to look your exe's function name
dumpbin -imports my.exe


good luck
 
Share this answer
 
Hi henry thank u for ur valuble answer. Ur answer helped me to find where is the error going. I am using M-Audio delta control panel. For that i am using WindowsXp sp3 supported dll. Previously we used WindowsXp sp3 supported dll.When we used that previous dll we get lib and .h file with sdk. But now we did't get them. I have to create lib and .h files for that dll and include in my project. When i created lib file for that dll and using those functions i am getting
"The procedure Entry point ****@*** is not fount in *.dll" Error.
I am unable to recover from that. I have read that these type of errors occurs due to dll corrupt. So i reinstalled drivers again tried. But i got the same error. Can any one help me with this problem.

Thank you all.
 
Share this answer
 
Hi henry thank u for ur valuble answer. Ur answer helped me to find where is the error going. I am using M-Audio delta control panel. For that i am using WindowsXp sp3 supported dll. Previously we used WindowsXp sp2 supported dll.When we used that previous dll we get lib and .h file with sdk. But now we did't get them. I have to create lib and .h files for that dll and include in my project. When i created lib file for that dll and using those functions i am getting
"The procedure Entry point ****@*** is not fount in *.dll" Error.
I am unable to recover from that. I have read that these type of errors occurs due to dll corrupt. So i reinstalled drivers again tried. But i got the same error. Can any one help me with this problem.
Thank you all.
 
Share this answer
 
What do you mean by lib file? where DLL would itself be 'Dynamic Link Library'

Have a look at this:
A Tutorial on creating DLLs with VC++ [^]
 
Share this answer
 
Comments
Emilio Garavaglia 4-Jun-10 8:20am    
Reason for my vote of 1
wrong asumptions.
To link a DLL you need an import library that maps the function declaration with the requirted DLL offset invocation. That's a static "lib"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900