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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top