Brett McCoy wrote: > I have a question about building DLLs and DEF files. Bear with me, I > am kind of a newbie at this... > > I am building a plugin for an application, using the vendor supplied > SDK and one of their example projects. I am using Visual C++ Express > 2008. Project is setup and builds fine. I have debugging setup using > the application as the debugging .exe target and my DLL with > breakpoints. So when I launch into debugging, my DLL (Flip.dll below) > gets loaded and then immediately unloaded: > > 'TVPaintAnimationPro.exe': Loaded 'C:\Program Files\TVPaint > Developpement\TVPaint Animation Pro\Plugins\Flip.dll', Symbols loaded. > 'TVPaintAnimationPro.exe': Loaded > 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456\msvcr90d.dll' > 'TVPaintAnimationPro.exe': Unloaded 'C:\Program Files\TVPaint > Developpement\TVPaint Animation Pro\Plugins\Flip.dll' > 'TVPaintAnimationPro.exe': Unloaded > 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456\msvcr90d.dll' > > I have a DEF file attached to the project, but I wonder whether or not > it is actually being and the DLL isn't getting loaded because no > exported symbols are found. How can I find this out? Is there a DLL > inspection tool available with VC++ Express? > > -- Brett > ------------------------------------------------------------ > "In the rhythm of music a secret is hidden; > If I were to divulge it, it would overturn the world." > -- Jelaleddin Rumi
The de facto standard tool is called Dependency Walker (aka Depends - not the undergarment). http://www.dependencywalker.com/ That tool ships with VS. Or at least it used to. Regardless, the latest version resides there at all times. The DEF file should contain an EXPORTS section, which lists all the functions you want to export (case-sensitive). It is fairly easy to put together - one function name per line. The #1 thing people forget to do is to make sure the linker knows about the DEF file. Simply adding it to the project is not enough. You have to edit the project settings and wander around the linker section. -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* MyTaskFocus 1.1 Get on task. Stay on task. http://www.CubicleSoft.com/MyTaskFocus/
