-
I create a process with CreateProcess() API function. In this step, I can get process id and thread id from the function. My problem is I can't terminate the process I just created because I don't know how to do (use what API functions). Anyone please help me. Thanks in advance.
-
-
Use the TerminateProcess api function along with, as parksie suggested, the CloseHandle api function.
Code:
Public Declare Function CloseHandle Lib "Kernel32" (ByVal Handle As Long) As Long
Public Declare Function TerminateProcess Lib "Kernel32" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long