home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / mswindo / programm / misc / 1516 < prev    next >
Encoding:
Text File  |  1992-08-26  |  1.8 KB  |  41 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!mnemosyne.cs.du.edu!nyx!bmcilroy
  3. From: bmcilroy@nyx.cs.du.edu (Bernie McIlroy)
  4. Subject: Re: App./TSR needs to know that a DOS session has focus - How?
  5. Message-ID: <1992Aug27.022006.15021@mnemosyne.cs.du.edu>
  6. X-Disclaimer: Nyx is a public access Unix system run by the University
  7.     of Denver for the Denver community.  The University has neither
  8.     control over nor responsibility for the opinions of users.
  9. Sender: usenet@mnemosyne.cs.du.edu (netnews admin account)
  10. Organization: Nyx, Public Access Unix at U. of Denver Math/CS dept.
  11. References: <1992Aug25.093642.8421@apricot.co.uk>
  12. Date: Thu, 27 Aug 92 02:20:06 GMT
  13. Lines: 26
  14.  
  15. In article <1992Aug25.093642.8421@apricot.co.uk> marcusj@apricot.co.uk (M
  16. rcus Jenkins) writes:
  17. >I have an app./TSR/DLL (and VxD for Enhanced Mode) system supporting
  18. >some special hardware.  I want (at least) one of these components
  19. >to be notified or find out by polling (and the latter would have to
  20. >be a re-entrant service since I would be polling off a harware IRQ)
  21. >that a DOS session is becoming active/inactive or is active.  How?
  22. >
  23.  
  24. There are three methods that come to mind:
  25.   1) In your TSR, watch for the Windows INT 2Fh Startup broadcast.  When
  26.      you see this, issues the INT 2Fh Get VM ID call.  At any given time,
  27.      your TSR can call the Get VM ID and compare to the original value 
  28.      which was the system VM ID.  (Sorry, I don't know the AX= numbers
  29.      offhand...)
  30.  
  31.   2) Your VxD will receive a VMM_Set_Execution_Focus call when you switch 
  32.      VMs.  Keep track of where you are. 
  33.  
  34.   3) At any time, your VxD can call Get_Cur_VM_Handle
  35.      and Test_Sys_VM_Handle to see if the currently executing VM is
  36.      a DOS box.
  37.  
  38. -------------------------------------------------------------------------
  39. The above opinions are mine and you can't have them; so there.
  40.  
  41.