flat assembler
Message board for the users of flat assembler.
Index
> Windows > DragQueryFile problem |
Author |
|
LocoDelAssembly 21 Nov 2007, 01:50
do you mean the typecast? The answer is simply, you DON'T cast.
Code: mov eax, [hwnd] cmp eax, [lParam] jne .skipIfBody |
|||
21 Nov 2007, 01:50 |
|
tangent 21 Nov 2007, 01:55
that's the stuff.. i appreciate it
*edit* okay, now it seems i'm having a problem with DragQueryFile telling me this: Code: invoke DragQueryFile,wparam,0xFFFFFFFF,szdfn,0 macro/proc32.inc [17] invoke [3]: pushd arg error: invalid value. from szdfn rb 50.. am i missing something that should be obvious? |
|||
21 Nov 2007, 01:55 |
|
LocoDelAssembly 21 Nov 2007, 04:31
I think you need this:
Quote: invoke DragQueryFile,[wparam],0xFFFFFFFF,szdfn,0 And, if szdfn is allocated on the stack (variables local to the procedure are), then you have to change "szdfn" to "addr szdfn", that will calculate the offset and pass that pointer to the API. http://flatassembler.net/docs.php?article=win32 explains how addr works at 2.1 Procedure parameters. |
|||
21 Nov 2007, 04:31 |
|
tangent 21 Nov 2007, 05:10
still getting the same error..
by the way it looks like so now: local szdfn db 128 invoke DragQueryFile,[wparam],0,addr szdfn,128 _________________ arg |
|||
21 Nov 2007, 05:10 |
|
LocoDelAssembly 21 Nov 2007, 13:48
Try using "local str[128]:BYTE"
|
|||
21 Nov 2007, 13:48 |
|
tangent 21 Nov 2007, 15:35
well, i noticed that even if i remove szdfn from it, same error..
invoke DragQueryFile,[wparam],-1,0,0 macro/proc32.inc [20] invoke [6]: call [proc] } error: undefined symbol. |
|||
21 Nov 2007, 15:35 |
|
LocoDelAssembly 21 Nov 2007, 16:10
No, now it is a new error. You have not imported DragQueryFile anywhere.
Can you post the code? I think we never get it work by just reading a single line of code. |
|||
21 Nov 2007, 16:10 |
|
coconut 21 Nov 2007, 20:21
you can also look in fasmw source for example of this
|
|||
21 Nov 2007, 20:21 |
|
tangent 21 Nov 2007, 23:28
i dont have a copy of the fasmw source.. the prog source is here: http://pastebin.ca/793126
|
|||
21 Nov 2007, 23:28 |
|
wisepenguin 21 Nov 2007, 23:35
hi tangent,
Code: library kernel32,'KERNEL32.DLL',\ user32,'USER32.DLL',\ shell32, "shell32.dll" include 'api\kernel32.inc' include 'api\user32.inc' include "api\shell32.inc" works for me using fasm 1.67.23 (latest as of now) |
|||
21 Nov 2007, 23:35 |
|
tangent 21 Nov 2007, 23:44
well, damn. i appreciate it
|
|||
21 Nov 2007, 23:44 |
|
coconut 26 Nov 2007, 16:16
the source is included with the fasm packages
|
|||
26 Nov 2007, 16:16 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.