Share via


IMsoComponentManager::FOnComponentExitState Method

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Notifies the component manager that the component identified by the dwComponentID parameter is exiting the state identified by the uStateID parameter.

BOOL FOnComponentExitState(
   DWORD_PTR dwComponentID,
   ULONG uStateID,
   ULONG uContext,
   ULONG cpicmExclude,
   IMsoComponentManager **rgpicmExclude
);

Parameters

  • dwComponentID [in]
    The ID of the component that is exiting. This ID is obtained by the IMsoComponentManager::FRegisterComponent method.

  • uStateID [in]
    One of the Msocstate enumeration values.

  • uContext [in]
    The state context that is affected by the state change. The component manager informs only the components that are within the specified state context. The values in the following table can be used.

    Value

    Description

    msoccontextAll = 0

    Specifies all state contexts in the state context tree.

    msoccontextMine = 1

    Specifies the component manager's state context.

    msoccontextOthers = 2

    Specifies all state contexts outside of the component manager’s state context.

  • cpicmExclude [in]
    The number of entries in the rgpicmExclude parameter.

  • rgpicmExclude [in, optional]
    An array that contains the number of pointers to component managers as specified by the cpicmExclude parameter. Components within the state context of a component manager that exists in this array should not be notified of the state change. The rgpicmExclude parameter can be NULL.

Return Value

TRUE if successful; otherwise, FALSE.

Remarks

Calls to this method are symmetric with calls to the IMsoComponentManager::OnComponentEnterState method. That is, if n OnComponentEnterState method calls are made, the component is considered to be in the state until n FOnComponentExitState method calls are made. Before revoking its registration, a component must make a sufficient number of FOnComponentExitState calls to offset any outstanding OnComponentEnterState calls it has made. In-place objects should not call this method with the uStateID parameter equal to msocstateModal when entering the modal state. Such objects should call the IOleInPlaceFrame::EnableModeless method instead.

See Also

Reference

IMsoComponentManager Interface