home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!axion!apricot!marcusj
- From: marcusj@apricot.co.uk (Marcus Jenkins)
- Newsgroups: comp.os.ms-windows.programmer.misc
- Subject: Re: App./TSR needs to know that a DOS session has focus - How?
- Message-ID: <1992Aug27.073803.15216@apricot.co.uk>
- Date: 27 Aug 92 07:38:03 GMT
- References: <1992Aug25.093642.8421@apricot.co.uk> <1992Aug27.022006.15021@mnemosyne.cs.du.edu>
- Organization: Apricot Computers Limited
- Lines: 51
-
- bmcilroy@nyx.cs.du.edu (Bernie McIlroy) writes:
-
- >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.
- >
-
- There are problems with the above:
-
- 1) This only applies to Enhanced Mode - one of my biggest headaches
- is the active Standard Mode DOS session.
-
- 2) I don't fancy issuing INT 2F's off a hardware interrupt. I have
- tried before and run into serious re-entrancy problems. This is
- not suprising if you trace though INT 2Fh with Soft-ICE (or whatever).
- You will find STI's all over the place (ANSI.SYS, DOS, HIMEM.SYS)
- etc. etc.. I have never seen it specified that INT 2Fh is supposed
- to be a re-entrant service.
-
- Thanks for your ideas, anyway.
-
- Anybody else?
-
-
- _ _ _
- ' ) ) ) Internet: marcusj@apricot.co.uk
- / / / __. __ _. . . _ UUCP: marcusj@apricot.uucp
- / ' (_(_/|_/ (_(__(_/_/_)_ If all else fails from US, try:
- Marcus Jenkins apricot!marcusj@relay.EU.net
- Tel: +44 21 472 3002 Fax: +44 21 471 2935
- Disclaimer: Anything I wrote above is, of course, my own view and
- does not in any way represent my employer.
-