Executing a 16 bit app from a 32 bit app 
Author Message
 Executing a 16 bit app from a 32 bit app

Any help would be greatly appreciated!!

I have a 32 bit app that I developed using VB4.0 and from it I give the
user the option of launching one of two 16 bit apps. When the 16 bit app
is executed I want the 32 bit app to wait for the 16 bit app to complete.

I am running this in Windows NT 3.51

The following is the code I use to launch the 16 bit app.

NOTE: static_com$ contains the string to startup the 16 bit app.

1:    Dim start As STARTUPINFO
2:    start.cb = Len(start)
3:    Iret% = CreateProcessA(0&, static_com$, 0&, 0&, 1&,
NORMAL_PRIORITY_CLASS, 0&, 0&, start, proc)

4:    Iret% = CloseHandle(proc.hThread)
5:    Iret% = WaitForSingleObject(proc.hProcess, INFINITE)
6:    If (Iret% <> WAIT_FAILED) Then
7:        lRet& = GetExitCodeProcess(proc.hProcess, dwExitCode&)
8:    End If
9:    Iret% = CloseHandle(proc.hProcess)

My problem is at line 5:.  When I exit the 16 bit app the 16 bit app freezes.
In order for the 32bit app to proceed I have to kill the 16 bit app from the
task list. When this is done lines 6 - 9 are executed.

Am I doing this right?

Does any one have any suggestions?

Again, any help would be greatly appreciated!!

A. Gray
TAMSCO
5030 Herzel Pl.
Beltsville MD 20705




Sat, 29 Aug 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

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

2. Need help calling 16-bit app from 32-bit app

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

4. 32 bit app / 16 bit DB

5. Desperate for help Converting 16 bit app to 32 bit

6. 16 bit app running in 32 bit world

7. DDE between 16 bit and 32 bit apps

8. Calling 16 bit DLL from 32 bit app

9. launching 16 bit app from 32 bit

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

11. Connect 16-bit VB app to 32-bit Access 97 DB

12. 16 bit DSN in 32 bit app

 

 
Powered by phpBB® Forum Software