IQuickActivate::QuickActivate
Quick
activates a control.
HRESULT QuickActivate(
QACONTAINER* pQaContainer, |
//Pointer to
container information structure |
QACONTROL* pQaControl
|
//Pointer to
control information structure |
); |
|
Parameters
pQaContainer
[in] Pointer
to a structure containing information about the container.
pQaControl
[out] Pointer
to a 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 Values
S_OK
The quick
activation is proceeding and the QACONTROL
E_FAIL
An unexpected
error occurred. The quick activation is not completed.
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 IOleObjectSetClientSite 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 new
IQuickActivate::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.
See Also