The command prompt process in this example is to perform a timeout for 10 seconds before auto-closing the window. When this happens, the command prompt process terminates by itself.
The VB6 program will pick up the signal and then will send out notification.

You need to use two kernel32 APIs namely..
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function GetExitCodeProcess Lib "kernel32" (ByVal hProcess As Long, lpExitCode As Long) As Long
Check out the code here or download here or here (Planet Source Code).
Thanks to these reference sites which offers incomplete descriptions.
No comments:
Post a Comment