flat assembler
Message board for the users of flat assembler.

Index > Windows > Windows 11 bug ? pos.x from GetCursorPos = -1

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 2075
Roman 04 Aug 2026, 11:24
Today i print cursor pos.x from GetCursorPos.
On my Laptop ninkear ybook 15 ryzen 3200u Windows 11 i get x= -1 ! If my cursor in left side screen.

But could be x from 0 to width screen.

On my descktop computer Windows 10 i get x from 0 to 1920

My question its Windows 11 bug or AMD ?


Last edited by Roman on 04 Aug 2026, 12:14; edited 3 times in total
Post 04 Aug 2026, 11:24
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 21023
Location: In your JS exploiting you and your system
revolution 04 Aug 2026, 11:39
It's probably a bug in the code. Show a minimal example code that gives the error.
Post 04 Aug 2026, 11:39
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 2075
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
Post 04 Aug 2026, 11:42
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 21023
Location: In your JS exploiting you and your system
revolution 04 Aug 2026, 11:46
Roman wrote:
Thats all.
Code:
mousePosit POINT ;as dd 0,0

invoke  GetCursorPos, mousePosit
    
Doesn't compile for me.
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.    
Perhaps there is an include missing? There is no format either.
Post 04 Aug 2026, 11:46
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 2075
Roman 04 Aug 2026, 11:47
replace POINT to dd 0,0

msdn
struct POINT {
LONG x;
LONG y;
}
Post 04 Aug 2026, 11:47
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 21023
Location: In your JS exploiting you and your system
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.
Post 04 Aug 2026, 14:01
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2026, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.