f_asmaa
asked on
Building DLL from .LIB & .H
SUMMARY
------------
I need the detailed steps of building a DLL project from .LIB & .H files using VC++ 6.0
DETAILES
-----------
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:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/bluetooth/bluetooth/bluetoothauthenticatedevice.asp
The two files (irprops.lib & bluetoothAPI.h) downlodable at http://www.mybestserver.com/download/bluetooth_lib.zip.
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?
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/bluetooth/bluetooth/bluetooth_functions.asp
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.
------------
I need the detailed steps of building a DLL project from .LIB & .H files using VC++ 6.0
DETAILES
-----------
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:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/bluetooth/bluetooth/bluetoothauthenticatedevice.asp
The two files (irprops.lib & bluetoothAPI.h) downlodable at http://www.mybestserver.com/download/bluetooth_lib.zip.
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?
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/bluetooth/bluetooth/bluetooth_functions.asp
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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?
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?
>>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.
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.
ASKER
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
Exports
ordinal name
_BluetoothAuthenticateDevi ce@20
_BluetoothAuthenticateMult ipleDevice s@16
_BluetoothAuthenticationAg ent@16
_BluetoothDisconnectDevice @8
_BluetoothDisplayDevicePro perties@8
_BluetoothEnableDiscovery@ 8
_BluetoothEnableIncomingCo nnections@ 8
_BluetoothEnumerateInstall edServices @16
_BluetoothFindBrowseGroupC lose@4
_BluetoothFindClassIdClose @4
_BluetoothFindDeviceClose@ 4
_BluetoothFindFirstBrowseG roup@8
_BluetoothFindFirstClassId @8
_BluetoothFindFirstDevice@ 8
_BluetoothFindFirstProfile Descriptor @8
_BluetoothFindFirstProtoco lDescripto rStack@8
_BluetoothFindFirstProtoco lEntry@8
_BluetoothFindFirstRadio@8
_BluetoothFindFirstService @8
_BluetoothFindNextBrowseGr oup@8
_BluetoothFindNextClassId@ 8
_BluetoothFindNextDevice@8
_BluetoothFindNextProfileD escriptor@ 8
_BluetoothFindNextProtocol Descriptor Stack@8
_BluetoothFindNextProtocol Entry@8
_BluetoothFindNextRadio@8
_BluetoothFindNextService@ 8
_BluetoothFindProfileDescr iptorClose @4
_BluetoothFindProtocolDesc riptorStac kClose@4
_BluetoothFindProtocolEntr yClose@4
_BluetoothFindRadioClose@4
_BluetoothFindServiceClose @4
_BluetoothGetDeviceInfo@8
_BluetoothGetRadioInfo@8
_BluetoothIsConnectable@4
_BluetoothIsDiscoverable@4
_BluetoothMapClassOfDevice ToImageInd ex@4
_BluetoothMapClassOfDevice ToString@4
_BluetoothRegisterForAuthe ntication@ 16
_BluetoothRemoveDevice@4
_BluetoothSdpEnumAttribute s@16
_BluetoothSdpGetAttributeV alue@16
_BluetoothSdpGetContainerE lementData @16
_BluetoothSdpGetElementDat a@12
_BluetoothSdpGetString@24
_BluetoothSelectDevices@4
_BluetoothSelectDevicesFre e@4
_BluetoothSendAuthenticati onResponse @12
_BluetoothSetServiceState@ 16
_BluetoothUnregisterAuthen tication@4
_BluetoothUpdateDeviceReco rd@4
_CPlApplet@16
Summary
C6 .debug$S
14 .idata$2
14 .idata$3
4 .idata$4
4 .idata$5
C .idata$6
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?
--------------------------
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
Exports
ordinal name
_BluetoothAuthenticateDevi
_BluetoothAuthenticateMult
_BluetoothAuthenticationAg
_BluetoothDisconnectDevice
_BluetoothDisplayDevicePro
_BluetoothEnableDiscovery@
_BluetoothEnableIncomingCo
_BluetoothEnumerateInstall
_BluetoothFindBrowseGroupC
_BluetoothFindClassIdClose
_BluetoothFindDeviceClose@
_BluetoothFindFirstBrowseG
_BluetoothFindFirstClassId
_BluetoothFindFirstDevice@
_BluetoothFindFirstProfile
_BluetoothFindFirstProtoco
_BluetoothFindFirstProtoco
_BluetoothFindFirstRadio@8
_BluetoothFindFirstService
_BluetoothFindNextBrowseGr
_BluetoothFindNextClassId@
_BluetoothFindNextDevice@8
_BluetoothFindNextProfileD
_BluetoothFindNextProtocol
_BluetoothFindNextProtocol
_BluetoothFindNextRadio@8
_BluetoothFindNextService@
_BluetoothFindProfileDescr
_BluetoothFindProtocolDesc
_BluetoothFindProtocolEntr
_BluetoothFindRadioClose@4
_BluetoothFindServiceClose
_BluetoothGetDeviceInfo@8
_BluetoothGetRadioInfo@8
_BluetoothIsConnectable@4
_BluetoothIsDiscoverable@4
_BluetoothMapClassOfDevice
_BluetoothMapClassOfDevice
_BluetoothRegisterForAuthe
_BluetoothRemoveDevice@4
_BluetoothSdpEnumAttribute
_BluetoothSdpGetAttributeV
_BluetoothSdpGetContainerE
_BluetoothSdpGetElementDat
_BluetoothSdpGetString@24
_BluetoothSelectDevices@4
_BluetoothSelectDevicesFre
_BluetoothSendAuthenticati
_BluetoothSetServiceState@
_BluetoothUnregisterAuthen
_BluetoothUpdateDeviceReco
_CPlApplet@16
Summary
C6 .debug$S
14 .idata$2
14 .idata$3
4 .idata$4
4 .idata$5
C .idata$6
>>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'.
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'.
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.