Home All Groups Group Topic Archive Search About
Author
14 Feb 2006 2:08 PM
Michael Iben
does System.Diagnostics.Process.Start() set inherit handles to true?  Or
does the VB program need to use the CreateProcess() API instead?

Author
15 Feb 2006 10:12 PM
Chris Dunaway
Looking at the code the System.Process.Start, the following lines are
present:

Try
Finally
       flag1 = NativeMethods.CreateProcess(Nothing, builder1, Nothing,
Nothing, True, num2, ptr1, text1, startupinfo1, process_information1)
       If Not flag1 Then
             num1 = Marshal.GetLastWin32Error
       End If

Notice that the 5th parameter to CreateProcess is True, which I believe
is the boolean that tells it to inherit handles.