Partager via


IMsoComponent::OnActivationChange 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 when a new object is being activated.

void OnActivationChange(
   IMsoComponent *pic,
   BOOL fSameComponent,
   const MSOCRINFO *pcrinfo,
   BOOL fHostIsActivating,
   const MSOCHOSTINFO *pchostinfo,
   DWORD dwReserved
);

Parameters

  • pic [in, optional]
    A pointer to the component being activated. This parameter may be NULL.

  • fSameComponent [in]
    TRUE to indicate that the pic parameter is the same component registration as the component that this method is being called on; otherwise, FALSE.

  • pcrinfo [in, optional]
    A pointer to an MSOCRINFO structure that specifies the active component’s registration information.

  • fHostIsActivating [in]
    TRUE to indicate that the host object is being activated; otherwise, FALSE. If the fHostIsActivating parameter is TRUE and the pic parameter is NULL, the host object is being activated. If the fHostIsActivating parameter is FALSE and the pic parameter is NULL, there is no current active object.

  • pchostinfo [in, optional]
    A pointer to an MSOCHOSTINFO structure that specifies the host component's information.

  • dwReserved [in]
    Reserved for future use. Should be 0.

Remarks

If the pic parameter is not NULL, the component is being activated. In this case, the fSameComponent parameter is TRUE if the pic parameter is the same component registration as the component that this method is being called on, and the pcrinfo parameter contains the registration information for the pic parameter.

If the pic parameter is NULL and the fHostIsActivating parameter is TRUE, the host is the object being activated, and the pchostinfo parameter contains the host information. If the pic parameter is NULL and the fHostIsActivating parameter is FALSE, there is no current active object.

See Also

Reference

IMsoComponent Interface