Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 1.35 KB

File metadata and controls

49 lines (35 loc) · 1.35 KB

Home

Function name : TerminateProcess

Group: Process and Thread - Library: kernel32


The TerminateProcess function terminates the specified process and all of its threads.


Code examples:

Start an executable from VFP application by using the CreateProcess
Terminating all running applications from a VFP program
Running MSDOS Shell as a child process with redirected input and output (smarter RUN command)
How to prevent users from accessing the Windows Desktop and from switching to other applications

Declaration:

BOOL TerminateProcess(
  HANDLE hProcess, // handle to the process
  UINT uExitCode   // exit code for the process
);  

FoxPro declaration:

DECLARE INTEGER TerminateProcess IN kernel32;
	INTEGER hProcess,;
	INTEGER uExitCode  

Parameters:

hProcess [in] Handle to the process to terminate.

uExitCode [in] Specifies the exit code for the process and for all threads terminated as a result of this call.


Return value:

If the function succeeds, the return value is nonzero.