flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
edfed 19 Apr 2022, 07:58
is there a way to give namespaces to imported functions,
like in the title? |
|||
![]() |
|
edfed 19 Apr 2022, 08:21
i didn't tryed that .
i tryed this: Code: mydll: import Mydll, .myfunc,'myfunc' the best way to do it should be like above, but don't work cause i don't get how import is implemented. the label before import is good because it lets the coder change the namespace without changing anything in the import section. good for fast switch between libs |
|||
![]() |
|
bitRAKE 19 Apr 2022, 08:22
I agree - there could be a better way. Would need to change import macro though.
I've done something similar for fasmg, because I want to not type "invoke". Imagine a similar wrapper could be created for fasm. |
|||
![]() |
|
macomics 19 Apr 2022, 12:20
IMPORT32.INC
Code: macro import name,[label,string] { common rb (- rva $) and 3 if defined name#.referred name#.lookup: forward ; 1 { if used label label label at name#label end if if used name#label ; } if string eqtype '' local _label dd RVA _label else dd 80000000h + string end if end if common if $ > name#.lookup name#.redundant = 0 dd 0 else name#.redundant = 1 end if name#.address: forward if used name#label ; <---- 2 if string eqtype '' name#label dd RVA _label ; <---- 3 else name#label dd 80000000h + string ; <---- 4 end if end if common if ~ name#.redundant dd 0 end if forward if used name#label & string eqtype ''; <---- 5 _label dw 0 db string,0 rb RVA $ and 1 end if common end if } |
|||
![]() |
|
edfed 19 Apr 2022, 19:36
with last version of fasm? i tryed with 1.70.03 and it gets an error with getModuleHandle in the first modification (label label at name#label)
|
|||
![]() |
|
macomics 19 Apr 2022, 20:13
I didn't invent the names of arguments for standard macros. I actually rewrote them for myself a long time ago and do not use them because I have Linux.
edfed wrote: i tryed with 1.70.03 and it gets an error with getModuleHandle in the first modification (label label at name#label) Code: label label dword at name#label
|
|||||||||||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.