I'm creating new processes from my application and want these processes to be killed when/if my application is crashed.
So i found this post: Kill child process when parent process is killed.
I took the first example and copied all the code to a new class under a function public void Close()
.
Got an error - The name Win32
does not exist in the current context so I added Microsoft.Win32
and now another error -
CloseHandle
is not recognized.
The type or namespace name 'CloseHandle' does not exist in the namespace 'Microsoft.Win32' (are you missing an assembly reference?)
How can i fix it ?