Launching and Monitoring a 16-bit Windows app from VB5 application running on Windows NT 4.0 
Author Message
 Launching and Monitoring a 16-bit Windows app from VB5 application running on Windows NT 4.0

I have a VB5 application that needs to launch a 16-bit Windows application
and then wait for it to close.

I know that under Windows NT 16-bit Windows and MS-DOS programs run under
Virtual Dos Machines (VDM). In addition 16-bit Windows apps use WOW(Windows
on Win32).  If I use the VB Shell command, the program launches but Shell
returns a 0 for the Process ID.  If I use CreateProcess API call, the
program will only launch if NTVDM and WOWEXEC are alredy running.  If not, I
get an error message from NTVDM that says Config.NT is not setup to start
Windows applications.  I like the way CreateProcess works because it returns
a handle that I can use with WaitForSingleObject to determine if the app
closed.

Has anyone ever done this before?  Let me know if you have any ideas.  I
will update this if I get anywhere.



Mon, 10 Jul 2000 03:00:00 GMT  
 Launching and Monitoring a 16-bit Windows app from VB5 application running on Windows NT 4.0

Here's a 16-bit Windows solution - I don't know if it works in NT, but
it might point you in the right direction.  The 32-bit solution is
completely different.

In declarations section:
Declare Function GetModuleUsage% Lib "Kernel" (ByVal hModule%)

Dim x%
x = Shell("NOTEPAD.EXE")      
While GetModuleUsage(x) > 0  
      DoEvents
Wend

Tom.



Quote:
>I have a VB5 application that needs to launch a 16-bit Windows application
>and then wait for it to close.

>Has anyone ever done this before?  Let me know if you have any ideas.  I
>will update this if I get anywhere.



Fri, 21 Jul 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Launching and Monitoring a 16-bit Windows app from VB5 application running on Windows NT 4.0

2. Launching 16-Bit apps from 32-Bit app?

3. How to detect 16-bit Windows-based application running under Windows NT

4. launching 16 bit app from 32 bit

5. Running my 16-bit app under windows 95

6. Unable to run VB4 16-bit app in Windows NT u62148@uicvm.uic.edu

7. vb4 16-bit apps disappear behind other running applications

8. 16 bit app running in 32 bit world

9. Converting a VB4.0 16 Bit app to VB5 32 bit

10. 16 bit dll's in VB5.0 (32 bit) apps

11. corruption of 16 bit db when used by both 16 and 32 bit apps

12. Launching files from a 16-bit application

 

 
Powered by phpBB® Forum Software