IQuickActivate::QuickActivate method (ocidl.h)

Quick activates a control.


HRESULT QuickActivate(
  QACONTAINER *pQaContainer,
  QACONTROL   *pQaControl



A pointer to the QACONTAINER structure containing information about the container.


A pointer to the QACONTROL structure filled in by the control to return information about the control to the container. The container calling this method must reserve memory for this structure.

Return value

If the method succeeds, the return value is S_OK. Otherwise, it is E_FAIL.


If the control does not support IQuickActivate, the container performs certain handshaking operations when it loads the control. The container calls certain interfaces on the control and the control, in turn, calls back to certain interfaces on the container's client site. First, the container creates the control object and calls QueryInterface to query for interfaces that it needs. Then, the container calls IOleObject::SetClientSite on the control, passing a pointer to its client site. Next, the control calls QueryInterface on this site, retrieving a pointer to additional necessary interfaces.

Using the QuickActivate method, the container passes a pointer to a QACONTAINER structure. The structure contains pointers to interfaces which are needed by the control and the values of some ambient properties that the control may need. Upon return, the control passes a pointer to a QACONTROL structure that contains pointers to its own interfaces that the container requires, and additional status information.

The IPersist*::Load and IPersist*::InitNew methods should be called after quick activation occurs. The control should establish its connections to the container's sinks during quick activation. However, these connections are not live until IPersist*::Load or IPersist*::InitNew has been called.


Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header ocidl.h

See also