flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > Non-existing procedures |
Author |
|
MichaelH 30 Jul 2007, 02:21
Hi ManOfSteel, you haven't really explained the problem but I'll take a guess and say that perhaps ???? the problem is your understanding of the interface macro which puts all the methods of a interface in a virtual block so you can easily reference address offsets.
For example ( usecom from the fasm example)- ShellTaskBar Code: ShellTaskBar dd ? virtual at 0 .QueryInterface dd ? .AddRef dd ? .Release dd ? .HrInit dd ? .AddTab dd ? .DeleteTab dd ? .ActivateTab dd ? .SetActiveAlt dd ? end virtual ; use it mov eax,[ShellTaskBar] push eax ; Note mov eax,[eax] below - ;this moves the "ShellTaskBar" object address that was created by windows using CoCreateInstance mov eax,[eax] ; Hence ShellTaskBar.HrInit is an offset of 12 (0xC) from the ; memory location of the "ShellTaskBar" object ; It is not an offset of 12 (0xC) from ShellTaskBar dd ? call[eax+ShellTaskBar.HrInit] Do not confuse "ShellTaskBar dd ?" with the ShellTaskBar com object that windows has created somewhere else in memory .... "ShellTaskBar dd ?" just holds the address of that memory. A virtual block is not output to the exe, it's just so memory offsets are easier to use in your code. Hope this helped. If not, please supply more detail of your problem. |
|||
30 Jul 2007, 02:21 |
|
vid 30 Jul 2007, 09:28
try to insert following instead of export:
Code: virtual at 0
dd name_of_function
end virtual If FASM assembles those functions after inserting this, then you are simply not refering those functions anywhere in your sources, so PROC macro leaves them out. That is most likely bug in your code. |
|||
30 Jul 2007, 09:28 |
|
ManOfSteel 30 Jul 2007, 13:40
Yes, indeed it was my misunderstanding of the interface macro. Thank you both for clarifying it.
|
|||
30 Jul 2007, 13:40 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.