Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[C++] Mouse interrupt giving me hell.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
sven3107
Expert Cheater
Reputation: 0

Joined: 04 Feb 2009
Posts: 118
Location: Belgium

PostPosted: Fri Aug 28, 2009 5:00 am    Post subject: [C++] Mouse interrupt giving me hell. Reply with quote

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
View user's profile Send private message Send e-mail MSN Messenger
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Fri Aug 28, 2009 5:05 am    Post subject: Reply with quote

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
View user's profile Send private message
sven3107
Expert Cheater
Reputation: 0

Joined: 04 Feb 2009
Posts: 118
Location: Belgium

PostPosted: Fri Aug 28, 2009 5:10 am    Post subject: Reply with quote

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... Confused

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
View user's profile Send private message Send e-mail MSN Messenger
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Fri Aug 28, 2009 5:17 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites