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 2.0.2.9, 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
LIBRARY Dll
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
LIBRARY Dll.dll
EXPORTS
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
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
LIBRARY Dll
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
LIBRARY Dll.dll
EXPORTS
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
This is the MakeDef AddIn that I wrote, make the following Change in your RadASM.ini file:
xx=MakeDef.DLL,2
Changes to
xx=MakeDef.DLL,1
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.
Ketil,
The default value for this AddIn should be set to 1 (no changes to the file).
xx=MakeDef.DLL,2
Changes to
xx=MakeDef.DLL,1
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.
Ketil,
The default value for this AddIn should be set to 1 (no changes to the file).
Hi FearHQ
It is the MakeDef addin that overwrite your def file.
You can open RadASM.ini and change section to:
xx=MakeDef.dll,2
to:
xx=MakeDef.dll,1
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)
KetilO
Edit:
donkey beat me to it.
It is the MakeDef addin that overwrite your def file.
You can open RadASM.ini and change section to:
xx=MakeDef.dll,2
to:
xx=MakeDef.dll,1
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)
KetilO
Edit:
donkey beat me to it.
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
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
:) 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:
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:
Hi donkey
Perfect solution. :alright:
KetilO
Perfect solution. :alright:
KetilO