flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > [solved] Needed help with macros |
Author |
|
ProMiNick 04 Jul 2019, 16:47
I fixit it myself: accidentaly I found that ShellTaskBar..com.object defined instead of ShellTaskBar.com.object, so I reduced ".\#.com.object = name#.com.interface" to just "\.com.object = name#.com.interface" - and all works. And register of symbolic ITaskbarList was different in includes & in example.
Code: macro interface definition { match name tail, definition: \{ virtual db \`name load initial@struct byte from $$ if initial@struct = '.' display 'Error: name of interface should not begin with a dot.',0Dh,0Ah err end if end virtual macro endi \\{ if $ display 'Error: definition of ',\`name,' contains illegal instructions.',0Dh,0Ah err end if match =@guid,@guid \\\{ display 'Error: missing GUID in definition of ',\`name,0Dh,0Ah err \\\} restruc stdmethod purge endi irpv methods,method@vtbl \\\{ restore method@vtbl \\\common ;define methods@vtbl methods define@vtbl name,methods define methods@\#name methods \\\} IID_\#name equ @guid restore @vtbl, @guid ;define@vtbl methods@vtbl ;match methods,methods@vtbl \\\{ \\\} end virtual \\} ;match :,tail \\{ \\} match =extends parent:, tail \\{ method@vtbl equ methods@\\#parent \\} \} struc stdmethod args& \{ define method@vtbl . \} macro GUID ID& \{ define @guid ID purge GUID \} define @vtbl virtual at 0 } macro define@vtbl name,[method] { match no, @vtbl \{ disply 'Error: define@vtbl is used outside of interface definition.',0Dh,0Ah err \} name#.#method PTR ? local value common name#.com.interface = $ / sizeof.PTR restruc name struc name vtbl:? \{ match , @struct \\{ define field@struct .,name,vtbl \\} match no, @struct \\{ . PTR vtbl virtual at 0 forward .#method PTR ? common .\#\\.com.object = name#.com.interface end virtual \\} \} restruc name#Vtbl struc name#Vtbl value \{ \local \..base label \..base forward .#method PTR value common label . at \..base \} } macro comobject name { virtual db `name load initial@struct byte from $$ if initial@struct = '.' display 'Error: name of com object should not begin with a dot.',0Dh,0Ah err end if end virtual macro endo \{ if $ display 'Error: definition of ',`name,' contains illegal instructions.',0Dh,0Ah err end if match =@guid,@guid \\{ display 'Error: missing GUID in definition of ',`name,0Dh,0Ah err \\} restruc stdmethod purge endo CLSID_#name equ @guid restore @vtbl, @guid end virtual \} macro CLSID ID& \{ define @guid ID purge CLSID \} define @vtbl virtual at 0 } |
|||
04 Jul 2019, 16:47 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.