home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / msdos / programm / 10670 < prev    next >
Encoding:
Text File  |  1992-11-16  |  2.0 KB  |  48 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!mcsun!sunic!aun.uninett.no!nuug!dhhalden.no!pc153.dhhalden.no!mortenk
  3. From: mortenk@dhhalden.no (MORTEN KNUDSEN)
  4. Subject: Re: Capturing Mouse Interrupts
  5. Message-ID: <mortenk.77.721938519@dhhalden.no>
  6. Keywords: mouse capture interrupt IRQ
  7. Lines: 34
  8. Sender: news@dhhalden.no (Network News User)
  9. Nntp-Posting-Host: pc153
  10. Organization: Ostfold College
  11. References: <ua#@byu.edu>
  12. Date: Mon, 16 Nov 1992 18:28:39 GMT
  13.  
  14. In article <ua#@byu.edu> $dougn@sasb.byu.edu (Douglas R. Nebeker - MIS_SAS) writes:
  15. >Help!
  16. >
  17. >I am trying to hook the mouse interrupts so that each time the mouse is 
  18. >moved, my routine can be notified.  I've tried hooking Int 33h, but found 
  19. >that didn't work since Int 33h is only called to initialize the mouse and/or 
  20. >driver.  Int 33h, AX=24h returns the IRQ number and tells me that my mouse 
  21. >is using IRQ 4 (I have comfirmed this with other utilities).
  22. >
  23. >However, when I hook IRQ4, the mouse still works great, but my routine is 
  24. >never notified of any mouse movements.  When I check those routines that 
  25. >show the owner of the different IRQs, they DON'T show my program (but they 
  26. >DO show my program owning other interrupts that I've hooked in the same way).
  27. >
  28. >Now...could it be that everytime I go into a program that uses the mouse 
  29. >that the program itself initializes the mouse, which "unhooks" my process 
  30. >from the interrupt chain?  If this is so, how can I keep my mouse routine 
  31. >hooked?!?
  32. >
  33. >
  34. >Thanks in advance for ANY help!
  35. >
  36. >____
  37. >
  38. >Douglas R. Nebeker         Internet: $dougn@sasb.byu.edu
  39.  
  40. I had this problem myself when writing a screen saver. This is what I did,
  41. using com1 as an example:
  42. I hooked int21, in order to prevent the mouse driver in getting back the
  43. com1 vector. When the mouse driver tries to get the com1 vector , I give it 
  44. my old com1 vector (what the com1 vector was before I hooked it). When the
  45. mouse driver tries to set the com1 vector, I store the vector as my old
  46. com1 vector. Cute? Workes great, too.
  47. I could mail you the code, if you want.
  48.