Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm using a libraries of 3rd party.
But there's have Dll file only (not have lib file).
How to using it for my project ?
I'm using C++ Application in Visual studio 2008

ps: I'm speak english not well. hi!
Posted
Updated 4-Nov-13 15:41pm
v3
Comments
Sergey Alexandrovich Kryukov 4-Nov-13 21:18pm    
Do you have documentation for the library?
—SA

Ideally, you should have exact documentation on what do you have in the DLL file, the list of exact signatures of all exported functions. Even more ideally, you should better have the source code for the DLL you want to use.

If you don't have either, you can use some utility like "dumpbin.exe": http://msdn.microsoft.com/en-us/library/c1h23y6c%28v=vs.110%29.aspx[^].

Even if you have documentation, it could be useful to get the exact names of function, but if you don't… If you are lucky, you can guess signatures of the functions by their mangled names: http://en.wikipedia.org/wiki/Name_mangling[^].

If you have all the information, consuming DLLs in C++ is really simple. Please start here:
http://msdn.microsoft.com/en-us/library/vstudio/1ez7dh12.aspx[^],
http://msdn.microsoft.com/en-us/library/vstudio/ms235636.aspx[^].

—SA
 
Share this answer
 
Comments
Mạnh Lê 4-Nov-13 21:37pm    
I did to read 2 link of you in your answer
But there are to creat a Dll library.
Of me, using a esixt Dll library

http://www.mediafire.com/download/5rzrh16rh2w300x/PCP21CT.rar
Sergey Alexandrovich Kryukov 4-Nov-13 21:53pm    
I know. I cannot edit to Web pages and separate information on using the DLLs from information of creation of them. :-)

Don't be so lazy, read it all. Everything is explained in detail. And you didn't answer my question: do you have documentation?

—SA
Mạnh Lê 4-Nov-13 21:57pm    
I did to reading and finding, but not have a way to loading the library
My doccument in the link in above comment of me

http://www.mediafire.com/download/5rzrh16rh2w300x/PCP21CT.rar
Sergey Alexandrovich Kryukov 4-Nov-13 22:37pm    
Sorry, nobody will take executable modules from who-knows-where. Read more carefully. DLLs can be loaded dynamically via LoadLibrary, or "statically" (yes, "Dynamic Load Library" loaded statically sounds weird, but terminology is just ugly). Statically, your executable module just prescribe the names of the DLL and functions as "imported". Read about DLL import:
http://msdn.microsoft.com/en-us/library/3y1sfaz2%28v=vs.110%29.aspx.
This is what you need.
—SA
Mạnh Lê 4-Nov-13 22:59pm    
Thank for this reply !
Thank for there anser for my question

This is my Dll file (x86 and x64 OS) and the SDK guide[^]

I don't find where to attach a file to codeproject
 
Share this answer
 
I using this command to get lib file from Dll file.
But there have only function name and its Address, don't have any argument and how to using there to my project

dumpbin /OUT:PCP21CT.def /exports PCP21CT.DLL

lib /def:PCP21CT.def /OUT:PCP21CT.lib
 
Share this answer
 

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