flat assembler
Message board for the users of flat assembler.
Index
> Windows > Windows 11 bug ? pos.x from GetCursorPos = -1 |
| Author |
|
|
revolution 04 Aug 2026, 11:39
It's probably a bug in the code. Show a minimal example code that gives the error.
|
|||
|
|
Roman 04 Aug 2026, 11:42
Thats all.
Code: ;my code 32 bits mousePosit POINT ;as dd 0,0 invoke GetCursorPos, mousePosit ;I simple do this to fix bug inc dword [mousePosit] ;x+1 inc dword [mousePosit+4] ;y+1 Last edited by Roman on 04 Aug 2026, 12:01; edited 1 time in total |
|||
|
|
revolution 04 Aug 2026, 11:46
Roman wrote: Thats all. Code: flat assembler version 1.73.31 (16384 kilobytes memory) test.asm [1]: mousePosit POINT ;as dd 0,0 processed: mousePosit POINT error: illegal instruction. |
|||
|
|
Roman 04 Aug 2026, 11:47
replace POINT to dd 0,0
msdn struct POINT { LONG x; LONG y; } |
|||
|
|
revolution 04 Aug 2026, 14:01
The code posted can't be assembled.
Please show the exact problem, with code that can be assembled, without needing to guess all the other needed things. |
|||
|
|
macomics 04 Aug 2026, 22:28
MSDN wrote: Remarks |
|||
|
|
Ali.Z 06 Aug 2026, 13:34
from my experience with other windows api specifically screen and shell related ones, there is some undocumented race condition at OS level.
getting cursor position is also one of the api that i had trouble with in past depending on the windows version and where the api is called from. what you should know is, some api are not supposed to be called in some specific window messages (wm_), because not all messages are queued, some passed directly to your wnd_proc, and some comes from other threads not necessarily the kernel. just know it is not totally your fault, because there is inconsistency between versions in first place. sadly i didnt compile or document the list of api that can have this side effect, but from what i remember, some window pos and rect, and one or two client area related things. _________________ Asm For Wise Humans |
|||
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2026, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.