IAPI::Terminate

method Terminate.

. Terminates forcibly the current process or another process.

. Since v2.35.4, triggers Windows shutdown, restart, logoff or lock desktop.

. Since v2.37.5, triggers additionally Windows sleep, hibernate.

 

HRESULT Terminate(
  long processID
);

Parameters

processID

[in] .   0 or any valid PID ( Process Identifier )

                   Available since v2.35.4 :

                     processID = -7, will lock Windows Desktop ( from Win2K to Windows 8 ).

                     processID = -8, will logoff Windows system.

                     processID = -9, will restart Windows system.

                     processID = -10, if available will sleep Windows system (since v2.37.5).

                     processID = -11, if available will hibernate Windows system (since v2.37.5).

                     processID = -66, will shutdown Windows system.

Return Values

S_OK

The operation was successfull.

E_UNEXPECTED

An unexpected error occoured.

E_FAIL

A general error occoured.

See Also

IAPI