System.Diagnostics.Process - create new process group?

B

Bo Byriel Nielsen

I need to create a process with a new process group. I think that this
can be done by using a DllImport of the kernel32 CreateProcess and
setting the CREATE_NEW_PROCESS_GROUP creation flag.

I'd rather avoid using DllImports. Is it possible to create a new
process group via the .net class library, perhaps the Process class?

TIA

/ Bo
 
J

Jeffrey Tan[MSFT]

Hi,

Thanks for your post.

No, .Net Process class uses ProcessStartInfo class to specify the
parameters information for CreateProcess API. However, ProcessStartInfo
class does not expose any properties or methods to specify
CREATE_NEW_PROCESS_GROUP creation flag. So we still have to p/invoke
CreateProcess API with CREATE_NEW_PROCESS_GROUP creation flag.

Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

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

Top