flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
LocoDelAssembly 24 Nov 2006, 15:04
I said replace "invoke" with "stdcall" but now you have to do the opposite
![]() In the other thread (if I understand it right), Plop proc was located at same source but in this case you are placing it in a DLL and calling it from an EXE trought the import table so there is no need for "stdcall [Plop]", you can use invoke which does the same but places the square brackets for you. I can't see the problem, and I'm on Ubuntu now so I can't test |
|||
![]() |
|
DustWolf 24 Nov 2006, 15:34
LocoDelAssembly wrote: I said replace "invoke" with "stdcall" but now you have to do the opposite I considered that. So stdcalls replaced with invokes and [] around the function name removed, it still has the same problem. Unless this kind of thing is a problem with the Olly debugger, it would seem the problem is in the point that the DLL's imports are never actually loaded, hence the call points to a memory location that isn't the "MessageBoxA" imported function. I'm thinking this can be overcome with something trivial but I don't know what it is. ![]() |
|||
![]() |
|
LocoDelAssembly 24 Nov 2006, 16:03
add "section '.reloc' fixups data discardable" at the end of the DLL source
|
|||
![]() |
|
DustWolf 24 Nov 2006, 16:05
LocoDelAssembly wrote: add "section '.reloc' fixups data discardable" at the end of the DLL source Whoa it works! ![]() And what does this code do ? ![]() |
|||
![]() |
|
LocoDelAssembly 24 Nov 2006, 16:10
Since a DLL can be loaded at a different base address of the one that fasm has choosen you need to add that section to make Windows able to relocate absolute referencies (like call dword ptr [function] where function label is an absolute offset). Note that I copied it from DLL example of fasm package because I didn't realise this error neather
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.