Hey guys, don't flame me if I'm doing something wrong, but I'm new to Win32Asm and all, but I've crawled up to Iczelion's Tutorial # 17 - Dll's. I'm using RadASM, new dll project, masm compiler. I used default linking params that come with project - 7,O,$B\LINK.EXE /SUBSYSTEM:WINDOWS /RELEASE /DLL /DEF:$6 /LIBPATH:"$L",3
I named my project "Dll" (original no?) and made a test function "TestFunction". So I open the default "Dll.Def" that's created with project, write
EXPORTS TestFunction
save, make-build... Seems successfull, but the function can't be found using GetProcAddress... Upon closer inspection, the .Def file changes drastically from what I wrote! instead it's

which has the expected result of the function not being exported... If I write the .Def file manually and try to use RadASM to assemble/link, the file changes to the above, and no export. If I link manually though, with a .Def I wrote by hand, it all works fine... Is there a reason for this behavior? Apart from this unusual behavior, RadASM is truly great ;) I look forward to the many possibilities this opens up
Posted on 2003-07-05 00:53:19 by FearHQ
This is the MakeDef AddIn that I wrote, make the following Change in your RadASM.ini file:


Changes to


If you want to use MakeDef, don't change the RadASM.ini file and you can right-click on the procedure in the Properties window and use Add To Exports. That will add the procedure to the export list and write it to the DEF file when it re-writes it.


The default value for this AddIn should be set to 1 (no changes to the file).
Posted on 2003-07-05 02:25:24 by donkey
Hi FearHQ

It is the MakeDef addin that overwrite your def file.
You can open RadASM.ini and change section to:




This will send the exports to output window instead of overwriting the def file.

Or you can simply use properties right click menu and mark the function as exported (Add export)



donkey beat me to it.
Posted on 2003-07-05 02:30:45 by KetilO
Thanks donkey
I didn't realise you couldn't edit the .Def manually... I'll consider turning off your plugin if it becomes a nuisance in the future, but right-click - add export works perfectly
Posted on 2003-07-05 02:30:58 by FearHQ
:) I'm pretty quick, I was just getting on the board and saw the post.

This may be a problem in MakeDef, I'll check it. It is not supposed to attempt a write to the file if there are no exports in the RAP file. The Def file should not have been changed.

EDIT: I made a change that stops the rebuild of the DEF file if there are no exports in the RAP file, I had made a change to the way one function returned and the return value was botched up. This is the new version, with this one the default can be left at 2 as if it isn't used it will not effect the DEF file:
Posted on 2003-07-05 03:08:38 by donkey
Hi donkey

Perfect solution. :alright:

Posted on 2003-07-05 04:37:21 by KetilO