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