Building DLL from .LIB & .H

Posted on 2004-10-11
Last Modified: 2008-01-09
I need the detailed steps of building a DLL project from .LIB & .H files using VC++ 6.0

I have Windows XP SP2 and I have installed Platform SDK in order to get the ibrary files to use in my Bluetooth application that will be developed in VC#.NET. The files are "irprops.lib" and "BluetoothAPIs.h" as mentioned at the end of this page:

The two files (irprops.lib & bluetoothAPI.h) downlodable at

I don't know how to use them in VC#.NET. It can deal with .DLL files only.

1) Please check the attached .LIB file. Does it contain the implelmenations of the functions listed in this link?

2) Does the file "irprops.lib" refere to other DLLs that I can use directly without the need to "irprops.lib" itself?

3) If I can develop a DLL project from th given files (irprops.lib & bluetoothAPI.h) then send me the detailed steps of doing so using VC++ 6.0 as I am not VC++ programmer.
Question by:f_asmaa
  • 3
  • 2
LVL 13

Expert Comment

ID: 12277754
In order to use functions from a DLL you need to include the .lib file at the linking stage. Either add it to the project or add it to the project settings on the linking tab.

And in each code file you want to use functions from that DLL you need to include the header:
#include "BluetoothAPI.h"

That should be it.
LVL 86

Accepted Solution

jkr earned 250 total points
ID: 12277828
Actually, the DLL you are referring to already exists, it's part of the runtime environment. Do a

dumpbin /exports *.dll > exports.txt

in the system32 directory and locate which DLL exports these APIs.

Author Comment

ID: 12278155
Dear jkr

1) What does dumpbin exactly do? Whn I run it I got the following error message
"This application has failed to start because mspdb60.dll was not found. Re-installing the application may fix this problem"

2) You told me that the already exists! Which dll and where can I find it?
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

LVL 86

Expert Comment

ID: 12278221
>>What does dumpbin exactly do?

It lists the functions exported from DLLs and will help ypu find which DLL actually exports these Bluetooth functions. a .lib file only establishes the 'link' between the functions you want to use and the DLL file they reside in, so creating an additional DLL will only introduce overhead.

>>You told me that the already exists! Which dll and where can I find it?

That I don't know from the top of my head and that's where. 'mspdb60.dll' usually resides in 'Common\MsDev98\bin' under your VC6 installation. I assume that your PATH environment not set up correctly.


Author Comment

ID: 12285574
Dear jkr,

When I run the dumpbin command on "Irprops.LIB", I get the following result. How can I use these results to get the DLL to use in VS.NET?

-------------------------------------- dumpbin /exports Irprops.lib --------------------------------------

Microsoft (R) COFF Binary File Dumper Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

Dump of file irprops.lib

File Type: LIBRARY


       ordinal    name



          C6 .debug$S
          14 .idata$2
          14 .idata$3
           4 .idata$4
           4 .idata$5
           C .idata$6
LVL 86

Expert Comment

ID: 12288859
>>When I run the dumpbin command on "Irprops.LIB"

That will not help. As I wrote, use

dumpbin /exports *.dll > exports.txt

in the system32 directory and locate which DLL exports these APIs in the resulting text file 'exports.txt'.

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Connecting to MS SQL db from Win32 application written in C 3 85
C++ assignment question 7 197
How to split this in C++ 4 101
Exception thrown at 0x00007FFD5BC81F28 7 43
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question