IContextState::SetDeactivateOnReturn method (comsvcs.h)

Sets the done flag, which controls whether the object deactivates on method return.

Syntax

HRESULT SetDeactivateOnReturn(
  [in] VARIANT_BOOL bDeactivate
);

Parameters

[in] bDeactivate

The done flag.

Return value

This method can return the standard return values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following values.

Return code Description
S_OK
The method completed successfully.
CONTEXT_E_NOJIT

Just-in-Time Activation is not available to this context.

Remarks

When set to true, the done flag causes the object to deactivate when the method call returns. When set to false, the object remains active after the method call returns. The default value of the done flag is false.

Requirements

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

See also

Consistent and Done Flags

IContextState