home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!elroy.jpl.nasa.gov!nntp-server.caltech.edu!heathh
- From: heathh@cco.caltech.edu (Heath Ian Hunnicutt)
- Subject: Re: NotifyRegister() question
- Message-ID: <1992Aug27.233103.624@cco.caltech.edu>
- Sender: news@cco.caltech.edu
- Nntp-Posting-Host: punisher
- Organization: California Institute of Technology, Pasadena
- References: <1992Aug27.173716.17324@franz.com>
- Date: Thu, 27 Aug 1992 23:31:03 GMT
- Lines: 29
-
- sdj@franz.com (Steve D. Jacobson) writes:
-
- >I would like to invoke WinExec() and then wait in a temporary GetMessage()/
- >DispatchMessage() loop until the application invoked by WinExec() terminates.
-
- >I am trying to use the toolhelp DLL NotifyRegister() function to do this.
-
- >By looking for a NFY_EXITTASK notification, I can tell that some application
- >has completed, but I can't tell that it's the one I'm interested in. The
- >other things I've tried, like looking to see if the NFY_DELMODULE handle
- >matches the return value I get from WinExec(), don't work.
-
- When you get the NFY_EXITTASK notification, one of the parameters
- that is sent to your notification callback is the handle of the exiting
- task. You should check to see if this parameter matches the return
- value from WinExec().
-
- One final note: You will probably want to store the return value
- from WinExec in some sort of global variable. That is fine, but often
- when your notification callback gets called, you will be on someone
- else's stack and in someone else's DGROUP. So, you will probably
- want to cpmpile your program in large model, so that your
- references to the global variable will be via FAR pointers.
- As an alternative, you could use a DLL.
-
-
- --
- On Saturday, April 18, 1992, this .sig became self-aware.
-
-