Shell execution of programs 
Author Message
 Shell execution of programs

I am trying to run an external program from within VB 6 and hold onto
that application with its handle. I can't seem to get the handle from
the shell command as is only gives a process ID. None of the API calls
seem to work except 'GetForegroundWindow' this command is not very
reliable because if you interrupt the flow with another program it gets
the handle of that. Help!

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Tue, 16 Jul 2002 03:00:00 GMT  
 Shell execution of programs
Here is a KB article on this subject:

http://support.microsoft.com/support/kb/articles/q242/3/08.asp?fr=1

-Dan Beacom

Quote:

>I am trying to run an external program from within VB 6 and hold onto
>that application with its handle. I can't seem to get the handle from
>the shell command as is only gives a process ID. None of the API calls
>seem to work except 'GetForegroundWindow' this command is not very
>reliable because if you interrupt the flow with another program it gets
>the handle of that. Help!

>Sent via Deja.com http://www.deja.com/
>Before you buy.



Tue, 16 Jul 2002 03:00:00 GMT  
 Shell execution of programs

Did you try the 'OpenProcess' API.  It should give you the process handle if
you supply the process ID.  MSDN article Q172273

-H. Szeto

Quote:

>I am trying to run an external program from within VB 6 and hold onto
>that application with its handle. I can't seem to get the handle from
>the shell command as is only gives a process ID. None of the API calls
>seem to work except 'GetForegroundWindow' this command is not very
>reliable because if you interrupt the flow with another program it gets
>the handle of that. Help!



Tue, 16 Jul 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. determining if a shelled program has ended execution (vb3.0)

2. Shell command execution in VB

3. VB SHELL EXECUTION

4. Execution of shell commands under VB

5. Monitoring a Shell() execution, when...

6. Shell program: running IE in Shell

7. Waiting for Shelled App to finish before resuming execution of parent app

8. ending a DOS shell after execution

9. Q: Shell execution with parameters.

10. Hiding the execution of a shelled command

11. Asynchronous SHELL execution

12. I want to resume script execution upon completion of shell process

 

 
Powered by phpBB® Forum Software