Export (0) Print
Expand All

IQuickActivate::QuickActivate method

Quick activates a control.

Syntax


HRESULT QuickActivate(
  [in]       QACONTAINER *pQaContainer,
  [in, out]  QACONTROL *pQaControl
);

Parameters

pQaContainer [in]

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

pQaControl [in, out]

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.

Remarks

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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Header

OCIdl.h

IDL

OCIdl.idl

IID

IID_IQuickActivate is defined as CF51ED10-62FE-11CF-BF86-00A0C9034836

See also

IPersistFile
IPersistStorage
IPersistStream
IPersistStreamInit
IQuickActivate

 

 

Community Additions

ADD
Show:
© 2014 Microsoft