How To Determine When a Shelled Process Has Terminated (96844)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Standard Edition for Windows 2.0
- Microsoft Visual Basic Standard Edition for Windows 3.0
- Microsoft Visual Basic Professional Edition for Windows 2.0
- Microsoft Visual Basic Professional Edition for Windows 3.0
- Microsoft Visual Basic Standard Edition for Windows 1.0
This article was previously published under Q96844 SUMMARY
Executing the Shell() function in a Visual Basic for Windows program starts
another executable program asynchronously and returns control to the Visual
Basic application. The shelled program continues to run indefinitely until
the user closes it -- not until your Visual Basic program terminates.
However, your program can wait until the shelled program has finished by
polling the return value of the Windows API GetModuleUsage() function. This
article describes the method and provides a code example. NOTE: The GetModuleUsage() function does not exist in Windows NT.
There is a completely different process that would be used to accomplish
the same thing from a 32-bit application. For additional information on the
32-bit implementation, please see the following article in the Microsoft
Knowledge Base:
129796 How to Determine When a Shelled 32-bit Process Has Terminated
Modification Type: | Minor | Last Reviewed: | 7/1/2004 |
---|
Keywords: | kb16bitonly kbhowto KB96844 |
---|
|