IComApp2Events::OnAppRecycle2 method (comsvcs.h)

Generated when the server application process is marked for recycling termination.

Syntax

HRESULT OnAppRecycle2(
  [in] COMSVCSEVENTINFO *pInfo,
  [in] GUID             guidApp,
  [in] GUID             guidProcess,
  [in] long             lReason
);

Parameters

[in] pInfo

A pointer to a COMSVCSEVENTINFO structure.

[in] guidApp

The application ID.

[in] guidProcess

The process ID.

[in] lReason

The reason code that explains why a process was recycled. The following codes are defined.

Value Meaning
CRR_NO_REASON_SUPPLIED
0x00000000
The reason is not specified.
CRR_LIFETIME_LIMIT
xFFFFFFFF
The specified number of minutes that an application runs before recycling was reached.
CRR_ACTIVATION_LIMIT
0xFFFFFFFE
The specified number of activations was reached.
CRR_CALL_LIMIT
0xFFFFFFFD
The specified number of calls to configured objects in the application was reached.
CRR_MEMORY_LIMIT
0xFFFFFFFC
The specified memory usage that a process cannot exceed was reached.
CRR_RECYCLED_FROM_UI
xFFFFFFFB
An administrator decided to recycle the process through the Component Services administration tool.

Return value

The user verifies the return values from this method.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header comsvcs.h

See also

IComApp2Events