cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Windows Programming
Use dll file
Use dll file
Mar 20, 2013 at 6:38am UTC
dushantha12
(68)
Hi,
I want to develop an application for send some APDU commands. In this case we are using a smart card reader. So my problem is I want to use a particular dll file. But I don't know how to link or add it into my program. Please help me to do this.
Thank you.
Mar 20, 2013 at 8:27am UTC
kbw
(9488)
If you have the matching .lib, you can link to it directly.
You can load it and pick out functions and call them at runtime. See: LoadLibrary(), GetProcAddress(), FreeLibrary().
Mar 20, 2013 at 8:49am UTC
dushantha12
(68)
Hi,
The thing is I only have this .dll library. Can I convert it into .lib file?
Thank you.
Mar 20, 2013 at 10:00am UTC
tath
(408)
you need to statically link dll library
Mar 20, 2013 at 12:46pm UTC
kbw
(9488)
No, you can't do that.
Load it dynamically as I described above.
Mar 20, 2013 at 3:35pm UTC
modoran
(2077)
dushantha12
wrote:
Hi,
The thing is I only have this .dll library. Can I convert it into .lib file?
Thank you.
Yes, you can create a import library from an existing .dll file.
http://support.microsoft.com/kb/131313
For other compilers there is specific tools too.
Mar 20, 2013 at 8:12pm UTC
Stormhawk
(86)
It all depends on what IDE( what compiler you are using for making your programs) such as Visual Studios c++, or dev c++.
Topic archived. No new replies allowed.