Inheritable Handles

  • Thread starter Thread starter Michael Iben
  • Start date Start date
M

Michael Iben

does System.Diagnostics.Process.Start() set inherit handles to true? Or
does the VB program need to use the CreateProcess() API instead?
 
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.
 
Back
Top