That makes sense. I guess a 3rd party library is mainly a friendlier wrapper around what could also be done more directly with knowledge of the Win32 API structures and calls involved. Jamal -----Original Message----- From: program-l-bounce@xxxxxxxxxxxxx [mailto:program-l-bounce@xxxxxxxxxxxxx] On Behalf Of Mark Long Sent: Thursday, September 08, 2005 10:41 AM To: program-l@xxxxxxxxxxxxx Subject: [program-l] Re: VB.NET and Shelling in General Those things are available from the Perfmon counters. -----Original Message----- From: program-l-bounce@xxxxxxxxxxxxx [mailto:program-l-bounce@xxxxxxxxxxxxx] Sent: 08 September 2005 14:53 To: program-l@xxxxxxxxxxxxx Subject: [program-l] Re: VB.NET and Shelling in General Specialized 3rd party tools are required, but I think some additional info about a running process may be retrieved, including its priority class, memory usage, and the module names of DLLs it has loaded. Jamal -----Original Message----- From: program-l-bounce@xxxxxxxxxxxxx [mailto:program-l-bounce@xxxxxxxxxxxxx] On Behalf Of Mark Long Sent: Thursday, September 08, 2005 8:19 AM To: program-l@xxxxxxxxxxxxx Subject: [program-l] Re: VB.NET and Shelling in General When you shell an app, it is an independant process. It is pretty hard to know what happened to it. About all that you can tell is if it is still running. There is a VB6 sample at http://support.microsoft.com/default.aspx?scid=kb;en-us;96844 The same is true in VB.NET as far as I am aware. -----Original Message----- From: program-l-bounce@xxxxxxxxxxxxx [mailto:program-l-bounce@xxxxxxxxxxxxx] On Behalf Of David Lant Sent: 08 September 2005 11:57 To: Program-L List (Program-L@xxxxxxxxxxxxx) Subject: [program-l] VB.NET and Shelling in General Hi folks, I'm looking at using a Shell function to invoke a legacy VB6 application to run unattended on a server. The process which will call this legacy app is a VB.NET Windows service. What I'm wondering is, is there a way for the calling process to determine whether the legacy app has raised a runtime error? I know the Shell function allows me to wait until the process has completed, and also returns the ProcID if the process is still running, such as when the timeout expires. But this would seem that I can only tell whether the process has stopped running or not, and not whether it actually finished what it was doing successfully. I have seen the System.Diagnostics.Process class in the .NET framework, and this does look like it might let me inspect any error output from the invoked legacy app. But as it's very new to me, and ever so slightly scary, I'm hoping I could achieve what I want just by using the Shell function. <smile> Also, in general terms, when an executable is invoked using a Shell function, does the .exe file get released once the program has finished? Or does it remain in memory until the calling process ends? If the latter, then it means my Windows service would lock the executable file after the first time it was invoked, and never release it. All thoughts welcomed. David Lant I.T. Consultant Consultancy & Development ICT Services Tel: (01392) 382464 Devon County Council accepts no legal responsibility for the contents of this message. The views expressed do not reflect those of Devon County Council. ** To leave the list, click on the immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe] ** If this link doesn't work then send a message to: ** program-l-request@xxxxxxxxxxxxx ** and in the Subject line type ** unsubscribe ** For other list commands such as vacation mode, click on the ** immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq] ** or send a message, to ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq ** To leave the list, click on the immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe] ** If this link doesn't work then send a message to: ** program-l-request@xxxxxxxxxxxxx ** and in the Subject line type ** unsubscribe ** For other list commands such as vacation mode, click on the ** immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq] ** or send a message, to ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq ** To leave the list, click on the immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe] ** If this link doesn't work then send a message to: ** program-l-request@xxxxxxxxxxxxx ** and in the Subject line type ** unsubscribe ** For other list commands such as vacation mode, click on the ** immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq] ** or send a message, to ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq ** To leave the list, click on the immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe] ** If this link doesn't work then send a message to: ** program-l-request@xxxxxxxxxxxxx ** and in the Subject line type ** unsubscribe ** For other list commands such as vacation mode, click on the ** immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq] ** or send a message, to ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq ** To leave the list, click on the immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe] ** If this link doesn't work then send a message to: ** program-l-request@xxxxxxxxxxxxx ** and in the Subject line type ** unsubscribe ** For other list commands such as vacation mode, click on the ** immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq] ** or send a message, to ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq