I have a WPF application that starts a new process using Process.Start(ProcessStartInfo info).
How do I get the group process ID of the process so that
The documentation for GenerateConsoleCtrlEvent states (emphasis mine):
The identifier of the process group to receive the signal. A process group is created when the CREATE_NEW_PROCESS_GROUP flag is specified in a call to the CreateProcess function. The process identifier of the new process is also the process group identifier of a new process group.
So if your processes are in a group, the WPF application's PID should be the group ID.