CPMRegister

This function registers a critical process.

Syntax

BOOL CMPRegister ( DWORD dwProcessId, DWORD dwNotifyInterval, DWORD dwRecoverFlags, WCHAR *pCommandLine, PCPMCALLBACK pfnCPMCallBack, DWORD dwRecoverFailFlags );

Parameters

dwProcessId
[in] Specifies the process identifier.
dwNotifyInterval
[in] Specifies how often, in milliseconds, the application should notify the critical process monitor that it is still functioning.
dwRecoverFlags
[in] Specifies what kind of actions the critical process monitor should take to recover the process. It is the following flag.
CPM_RELAUNCH
The critical process needs to relaunch the process if the process is not responding.
pCommandLine
[in] Pointer to the command line Unicode string that launches the process.
pfnCPMCallBack
[in] Pointer to a callback function within the calling process.
dwRecoverFailFlags
[in] Specifies that actions should be taken if recovery failed. It is the following flag.
CPM_RELAUNCH_FAIL_OK
No action is taken.

Return Values

TRUE indicates success. FALSE indicates failure.

Remarks

Only a process that is essential for the proper operation of the Auto PC should call this function. The process must call CPMNotify at a rate at least as frequent as the notification interval that the process passes to CPMRegister. The process must also define the callback function that the process registers by calling CPMRegister,

See Also

CPMNotify, CPMUnRegister, CPMCallback