VB and VBA Users Source Code: Uncover internal DLL functions with Dependency Walker
[
Home
|
Contents
|
Search
|
Reply
| Previous | Next ]
VB/VBA Source Code
Uncover internal DLL functions with Dependency Walker
By:
Andrew Baker
Email (spam proof):
Email the originator of this post
Date:
Friday, October 06, 2000
Hits:
554
Category:
Windows API
Article:
While the Windows API functions are fairly well documented, you may come across other DLL files that remain a mystery. For example, suppose you want to incorporate the MIDAS digital audio player into your application. The help files that come with this free DLL list all the important external function names. However, because the DLL doesn't support Visual Basic, you must hook into the DLL with API declarations. The internal names supported in this library aren't in the help files. To unravel this mystery, you can use the Dependency Walker, a handy utility that comes with Visual Studio (appears as Depends on the Windows program menu). Simply point the utility to the DLL in question, and it will list all the internal file names that you'll need to refer to in your API declarations. For example, in the MIDAS DLL, you use a function called MIDASplayModule to play a sound module. However, the internal name for the function is _MIDASplayModule@8. As a result, you must declare the function in Visual Basic like so Declare Function MIDASplayModule Lib "midas11.dll" Alias _ "_MIDASplayModule@8" (ByVal module As Long, ByVal loopSong _ As Boolean) As Long Using the Dependency Walker on MIDAS, you could quickly and easily determine the library's internal function names.
Terms and Conditions
Support this site
Download a trial version of the Excel Workbook Rebuilder