The DeactivateActCtx function deactivates the activation context corresponding to the specified cookie.
BOOL DeactivateActCtx( DWORD dwFlags, ULONG_PTR ulCookie );
Flags that indicate how the deactivation is to occur.
If this value is set and the cookie specified in the ulCookie parameter is in the top frame of the activation stack, the activation context is popped from the stack and thereby deactivated.
If this value is set and the cookie specified in the ulCookie parameter is not in the top frame of the activation stack, this function searches down the stack for the cookie.
If the cookie is found, a STATUS_SXS_EARLY_DEACTIVATION exception is thrown.
If the cookie is not found, a STATUS_SXS_INVALID_DEACTIVATION exception is thrown.
This value should be specified in most cases.
If this value is set and the cookie specified in the ulCookie parameter is in the top frame of the activation stack, the function returns an ERROR_INVALID_PARAMETER error code. Call
GetLastError to obtain this code.
If this value is set and the cookie is not on the activation stack, a STATUS_SXS_INVALID_DEACTIVATION exception will be thrown.
If this value is set and the cookie is in a lower frame of the activation stack, all of the frames down to and including the frame the cookie is in is popped from the stack.
The ULONG_PTR that was passed into the call to ActivateActCtx. This value is used as a cookie to identify a specific activated activation context.
If the function succeeds, it returns TRUE. Otherwise, it returns FALSE.
The deactivation of activation contexts must occur in the reverse order of activation. It can be understood as popping an activation context from a stack.
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|
|Header||winbase.h (include Windows.h)|