calling convention - (FASM) How to call properly a WinAPI like FindFirstFile and FindNextFile without use invoke? -
my problem following: have program looking in current directory specific file extension. code works if use invoke macro included in fasm. need call winapi using call instruction directly, , pushing parameters in stack.
i have tried this, don't works , crashes program:
;push parameters function push find_struct ;put in stack address of find_struct push file_extension ;file extension call findfirstfile ; find first *.fly
please, can explain me how call winapi findfirstfile , findnextfile??? answers.
i have found api name pointer. if right, way invoke api name enclosing in square brackets api name, this: [api_name]
. trick works @ least fasm assembler , me.
if don't use square brackets, calling address of pointer, not pointed address. reason, use square brackets , enclose in them api name, call api address, instead pointer address.
i expect answer question can useful people same problem.
Comments
Post a Comment