| View previous topic :: View next topic |
| Author |
Message |
sven3107 Expert Cheater
Reputation: 0
Joined: 04 Feb 2009 Posts: 118 Location: Belgium
|
Posted: Fri Aug 28, 2009 5:00 am Post subject: [C++] Mouse interrupt giving me hell. |
|
|
I've been trying to move the mouse using innterrupt 51.
First of all, I don't know if 51 is the decimal or hexadecimal notation, although I tried both.
Also, I try setting AX to 4, while setting the other registers to the coordinates, but the problem always shows up when the interrupt is called, giving me an access violation at address 0xFFFFFFFF...
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Fri Aug 28, 2009 5:05 am Post subject: |
|
|
0x33/51d is the interrupt number
here's a tutorial :
http://www.writeka.com/emage/mouse_events.html
i assume you're doing 16 bit development.... you can't just use interrupts in regular 32 bit development
|
|
| Back to top |
|
 |
sven3107 Expert Cheater
Reputation: 0
Joined: 04 Feb 2009 Posts: 118 Location: Belgium
|
Posted: Fri Aug 28, 2009 5:10 am Post subject: |
|
|
Yes, I've tried 0x33 as well, still wouldn't work.
Also, I've looked up the interrupt as well, but there they claimed it works in Win32...
I've also tested both with AX set to 2, to hide the cursor, but it always gives the same error.
Unhandled exception at 0x00c71414 in MoveMouse.exe: 0xC0000005: Access violation reading location 0xffffffff.
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Fri Aug 28, 2009 5:17 am Post subject: |
|
|
oh well that is your problem. if you want to write 32 bit programs you can not use 16 bit interrupts. those are dos/bios functions which work only in 16 bit programs
an alternative is to write a ring0 driver program and you can then use bios calls.. you could alternatively link with a 16 bit linker and then run the program under the windows emulator (virtual 86 mode)
but you can't avoid the win32 api for 32 bit programs i'm afraid..
|
|
| Back to top |
|
 |
|