home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / internet / scripting / spruuids / inc_ext / compmgr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  23.6 KB  |  476 lines

  1. //---------------------------------------------------------------------------
  2. // CompMgr.h
  3. //---------------------------------------------------------------------------
  4. // This file contains the exported interfaces and declarations for 
  5. // Component Manager Interfaces.
  6. //---------------------------------------------------------------------------
  7. // Copyright (c) 1995-1997 Microsoft Corporation
  8. //---------------------------------------------------------------------------
  9.  
  10.  
  11. #ifdef INITGUID
  12.     #define DEFINE_GUID2(name, bCategory, bIndex) \
  13.         EXTERN_C const GUID name = {0x000C0000 | MAKEWORD(bIndex, bCategory),}
  14. #else
  15.     #define DEFINE_GUID2(name, bCategory, bIndex) \
  16.         EXTERN_C const GUID name
  17. #endif
  18.  
  19. DEFINE_GUID2(IID_IOleComponent,        0x06, 0x00);
  20. DEFINE_GUID2(IID_IOleComponentManager, 0x06, 0x01);
  21.  
  22.  
  23.  
  24. //***************************************************************************
  25. // Component integration structures and constants
  26. //***************************************************************************
  27.  
  28. //---------------------------------------------------------------------------
  29. // Component registration flags
  30. //---------------------------------------------------------------------------
  31. enum
  32.     {
  33.     cmgrrfNeedIdleTime         = 1,  // needs idle time
  34.     cmgrrfNeedPeriodicIdleTime = 2,  // needs idle time every N milliseconds
  35.     cmgrrfPreTranslateKeys     = 4,  // must process keyboard msgs 
  36.                                  // before translation
  37.     cmgrrfPreTranslateAll      = 8,  // must process all msgs 
  38.                                  // before translation
  39.     };
  40.  
  41.  
  42. //---------------------------------------------------------------------------
  43. // Component registration advise flags (see cmgrstate enumeration)
  44. //---------------------------------------------------------------------------
  45. enum
  46.     {
  47.     cmgradvfModal              = 1,  // needs modal state change notification
  48.                                  // (must be registered by components
  49.                                  // managing a toplevel window)                                                
  50.     cmgradvfRedrawOff          = 2,  // needs redrawOff state change notif
  51.     cmgradvfWarningsOff        = 4,  // needs warningsOff state change notif
  52.     cmgradvfRecording          = 8,  // needs Recording state change notif
  53.     cmgradvfExclusiveActive    = 16, // needs ExclusiveActive change notif
  54.                                  // (must be registered by components
  55.                                  //  managing a window with UI).
  56.     };
  57.  
  58.  
  59. //---------------------------------------------------------------------------
  60. // Component registration information
  61. //---------------------------------------------------------------------------
  62. typedef struct _CMGRRINFO
  63.     {
  64.     ULONG cbSize;             // size of CMGRRINFO structure in bytes.
  65.     ULONG uIdleTimeInterval;  // If cmgrrfNeedPeriodicIdleTime is registered
  66.                           // in grfcrf, component needs to perform
  67.                           // periodic idle time tasks during an idle phase
  68.                           // every uIdleTimeInterval milliseconds.
  69.     DWORD grfcrf;             // bit flags taken from cmgrrf values (above)
  70.     DWORD grfcadvf;           // bit flags taken from cmgradvf values (above)
  71.     } CMGRRINFO;
  72.  
  73.  
  74. //---------------------------------------------------------------------------
  75. // Idle flags, passed to IOleComponent::FDoIdle and 
  76. // IOleStdComponentMgr::FDoIdle.
  77. //---------------------------------------------------------------------------
  78. enum
  79.     {
  80.     cmgridlefPeriodic    = 1,  // periodic idle tasks
  81.     cmgridlefNonPeriodic = 2,  // any nonperiodic idle task
  82.     cmgridlefPriority    = 4,  // high priority, nonperiodic idle tasks
  83.     cmgridlefAll         = -1  // all idle tasks
  84.     };
  85.  
  86.  
  87. //---------------------------------------------------------------------------
  88. // Reasons for pushing a message loop, passed to 
  89. // IOleComponentHost::FPushMessageLoop.  The host should remain in message
  90. // loop until IOleComponent::FContinueMessageLoop returns FALSE.
  91. //---------------------------------------------------------------------------
  92. enum
  93.     {
  94.     cmgrloopFocusWait = 1,  // component is activating host 
  95.     cmgrloopDoEvents  = 2,  // component is asking host to process messages
  96.     cmgrloopDebug     = 3,  // component has entered debug mode
  97.     cmgrloopModalForm = 4   // component is displaying a modal form  
  98.     };
  99.  
  100.  
  101. //---------------------------------------------------------------------------
  102. // cmgrstate values: state IDs passed to 
  103. //  IOleComponent::OnEnterState, 
  104. //  IOleComponentManager::OnComponentEnterState/FOnComponentExitState/FInState,
  105. //
  106. //  When the host or a component is notified through one of these methods that 
  107. //  another entity (component or host) is entering or exiting a state 
  108. //  identified by one of these state IDs, the host/component should take
  109. //  appropriate action:
  110. //      cmgrstateModal (modal state):
  111. //        If app is entering modal state, host/component should disable
  112. //        its toplevel windows, and reenable them when app exits this
  113. //        state.  Also, when this state is entered or exited, host/component
  114. //        should notify approprate inplace objects via 
  115. //        IOleInPlaceActiveObject::EnableModeless.
  116. //    cmgrstateRedrawOff (redrawOff state):
  117. //        If app is entering redrawOff state, host/component should disable
  118. //        repainting of its windows, and reenable repainting when app exits
  119. //        this state.
  120. //    cmgrstateWarningsOff (warningsOff state):
  121. //        If app is entering warningsOff state, host/component should disable
  122. //        the presentation of any user warnings, and reenable this when
  123. //        app exits this state.
  124. //    cmgrstateRecording (Recording state):
  125. //        Used to notify host/component when Recording is turned on or off.
  126. //    cmgrstateExclusiveActive (Exclusive Active state)
  127. //        TODO: add comments on what host/component should do.
  128. //---------------------------------------------------------------------------
  129. enum
  130.     {
  131.     cmgrstateModal       = 1,     // Modal state; disable toplevel windows
  132.     cmgrstateRedrawOff   = 2,     // RedrawOff state; disable window repainting
  133.     cmgrstateWarningsOff = 3,     // WarningsOff state; disable user warnings
  134.     cmgrstateRecording   = 4,     // Recording state
  135.     cmgrstateExclusiveActive = 5, // ExclusiveActive state; TODO: add brief
  136.                               // comment on what should be done here
  137.     };
  138.  
  139.  
  140. //---------------------------------------------------------------------------
  141. // ** Comments on State Contexts **
  142. //---------------------------------------------------------------------------
  143. // IOleComponentManager::FCreateSubComponentManager allows one to create a 
  144. // hierarchical tree of component managers.  This tree is used to maintain 
  145. // multiple contexts with regard to cmgrstateXXX states.  These contexts are 
  146. // referred to as 'state contexts'.
  147. // Each component manager in the tree defines a state context.  The
  148. // components registered with a particular component manager or any of its
  149. // descendents live within that component manager's state context.  Calls
  150. // to IOleComponentManager::OnComponentEnterState/FOnComponentExitState
  151. // can be used to affect all components, only components within the component
  152. // manager's state context, or only those components that are outside of the
  153. // component manager's state context.  IOleComponentManager::FInState is used
  154. // to query the state of the component manager's state context at its root.
  155. //
  156. // cmgrcontext values: context indicators passed to 
  157. // IOleComponentManager::OnComponentEnterState/FOnComponentExitState.
  158. // These values indicate the state context that is to be affected by the
  159. // state change. 
  160. // In IOleComponentManager::OnComponentEnterState/FOnComponentExitState,
  161. // the comp mgr informs only those components/host that are within the
  162. // specified state context.
  163. //---------------------------------------------------------------------------
  164. enum
  165.     {
  166.     cmgrcontextAll    = 0, // all state contexts in state context tree
  167.     cmgrcontextMine   = 1, // component manager's state context
  168.     cmgrcontextOthers = 2, // all other state contexts outside of comp mgr's
  169.     };
  170.  
  171.  
  172. //---------------------------------------------------------------------------
  173. // Defines the IOleComponent interface
  174. //---------------------------------------------------------------------------
  175. // Any component that needs idle time, the ability to process messages before
  176. // they are translated (for example, to call TranslateAccelerator() or
  177. // IsDialogMessage), notification about modal states, or the ability push
  178. // message loops must implement this interface and register with the
  179. // Component Manager.
  180. //---------------------------------------------------------------------------
  181. #undef  INTERFACE
  182. #define INTERFACE  IOleComponent
  183.  
  184. DECLARE_INTERFACE_(IOleComponent, IUnknown)
  185.     {
  186.     // *** IUnknown methods ***
  187.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppvObj) PURE;
  188.     STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  189.     STDMETHOD_(ULONG, Release) (THIS) PURE;
  190.  
  191.     // Give component a chance to process the message pMsg before it is
  192.     // translated and dispatched. Component can do TranslateAccelerator,
  193.     // do IsDialogMessage, modify pMsg, or take some other action.
  194.     // Return TRUE if the message is consumed, FALSE otherwise.
  195.     STDMETHOD_(BOOL, FPreTranslateMessage) (THIS_ MSG *pMsg) PURE;
  196.  
  197. #if MAC
  198.     // Give Macintosh component a chance to process the event pEvt
  199.     // before it is processed by the host. 
  200.     // Return TRUE if the event is consumed, FALSE otherwise.
  201.     // (WLM components can simply return FALSE.)
  202.     STDMETHOD_(BOOL, FPreProcessMacEvent) (THIS_ EventRecord *pEvt) PURE;
  203. #endif // MAC
  204.     
  205.     // Notify component when app enters or exits (as indicated by fEnter)
  206.     // the state identified by uStateID (a value from cmgrstate enumeration).
  207.     // Component should take action depending on value of uStateID
  208.     // (see cmgrstate comments, above).
  209.     //     
  210.     // Note: If n calls are made with TRUE fEnter, component should consider 
  211.     // the state to be in effect until n calls are made with FALSE fEnter.
  212.     //     
  213.     // Note: Components should be aware that it is possible for this method to
  214.     // be called with FALSE fEnter more times than it was called with TRUE 
  215.     // fEnter (so, for example, if component is maintaining a state counter
  216.     // (incremented when this method is called with TRUE fEnter, decremented
  217.     // when called with FALSE fEnter), the counter should not be decremented
  218.     // for FALSE fEnter if it is already at zero.)
  219.     STDMETHOD_(void, OnEnterState) (THIS_ ULONG uStateID, BOOL fEnter) PURE;
  220.  
  221.     // Notify component when the host application gains or loses activation.
  222.     // If fActive is TRUE, the host app is being activated and dwOtherThreadID
  223.     // is the ID of the thread owning the window being deactivated.
  224.     // If fActive is FALSE, the host app is being deactivated and 
  225.     // dwOtherThreadID is the ID of the thread owning the window being 
  226.     // activated.
  227.     // Note: this method is not called when both the window being activated
  228.     // and the one being deactivated belong to the host app.
  229.     STDMETHOD_(void, OnAppActivate) (THIS_ 
  230.         BOOL fActive, DWORD dwOtherThreadID) PURE;
  231.     
  232.     // Notify the active component that it has lost its active status because
  233.     // the host or another component has become active.
  234.     STDMETHOD_(void, OnLoseActivation) (THIS) PURE;
  235.  
  236.     // Give component a chance to do idle time tasks.  grfidlef is a group of
  237.     // bit flags taken from the enumeration of cmgridlef values (above),
  238.     // indicating the type of idle tasks to perform.  
  239.     // Component may periodically call IOleComponentManager::FContinueIdle; 
  240.     // if this method returns FALSE, component should terminate its idle 
  241.     // time processing and return.  
  242.     // Return TRUE if more time is needed to perform the idle time tasks, 
  243.     // FALSE otherwise.
  244.     // Note: If a component reaches a point where it has no idle tasks
  245.     // and does not need FDoIdle calls, it should remove its idle task
  246.     // registration via IOleComponentManager::FUpdateComponentRegistration.
  247.     // Note: If this method is called on while component is performing a 
  248.     // tracking operation, component should only perform idle time tasks that
  249.     // it deems are appropriate to perform during tracking.
  250.     STDMETHOD_(BOOL, FDoIdle) (THIS_ DWORD grfidlef) PURE;
  251.     
  252.     // Called once per iteration of a message loop that the component pushed.
  253.     // uReason and pvLoopData are the reason and the component private data
  254.     // that were passed to IOleComponentManager::FPushMessageLoop.
  255.     // Return TRUE if the message loop should continue, FALSE otherwise.
  256.     STDMETHOD_(BOOL, FContinueMessageLoop) (THIS_ 
  257.         ULONG uReason, void *pvLoopData) PURE;
  258.  
  259.     // Called when component manager wishes to know if the component is in a
  260.     // state in which it can terminate.  If fPromptUser is FALSE, component
  261.     // should simply return TRUE if it can terminate, FALSE otherwise.
  262.     // If fPromptUser is TRUE, component should return TRUE if it can
  263.     // terminate without prompting the user; otherwise it should prompt the
  264.     // user, either 1.) asking user if it can terminate and returning TRUE
  265.     // or FALSE appropriately, or 2.) giving an indication as to why it
  266.     // cannot terminate and returning FALSE.
  267.     STDMETHOD_(BOOL, FQueryTerminate) (THIS_ BOOL fPromptUser) PURE;
  268.     
  269.     // Called when component manager wishes to terminate the component's
  270.     // registration.  Component should revoke its registration with component
  271.     // manager, release references to component manager and perform any
  272.     // necessary cleanup.
  273.     STDMETHOD_(void, Terminate) (THIS) PURE;
  274.     };
  275.  
  276.  
  277.  
  278. //---------------------------------------------------------------------------
  279. // Defines the IOleComponentManager interface
  280. //---------------------------------------------------------------------------
  281. // A component manager is an object implementing the IOleComponentManager
  282. // interface.  The component manager coordinates components with its message
  283. // loop for proper distribution of idle time and pre-translation message
  284. // processing.    
  285. // It also coordinates modalities and the pushing of message loops.
  286. //---------------------------------------------------------------------------
  287. #undef  INTERFACE
  288. #define INTERFACE  IOleComponentManager
  289.  
  290. DECLARE_INTERFACE_(IOleComponentManager, IUnknown)
  291.     {
  292.     // *** IUnknown methods ***
  293.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppvObj) PURE;
  294.     STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  295.     STDMETHOD_(ULONG, Release) (THIS) PURE;
  296.  
  297.     // Return in *ppvObj an implementation of interface iid for service
  298.     // guidService (same as IServiceProvider::QueryService).
  299.     // Return NOERROR if the requested service is supported, otherwise return
  300.     // NULL in *ppvObj and an appropriate error (eg E_FAIL, E_NOINTERFACE).
  301.     STDMETHOD(QueryService) (THIS_
  302.         REFGUID guidService, REFIID iid, void **ppvObj) PURE;
  303.  
  304.     // Register component piComponent and its registration info pcrinfo with
  305.     // this component manager.  Return in *pdwComponentID a cookie which will
  306.     // identify the component when it calls other IOleComponentManager
  307.     // methods.
  308.     // Return TRUE if successful, FALSE otherwise.
  309.     STDMETHOD_(BOOL, FRegisterComponent) (THIS_
  310.         IOleComponent *piComponent, const CMGRRINFO *pcrinfo, 
  311.         DWORD *pdwComponentID) PURE;
  312.     
  313.     // Undo the registration of the component identified by dwComponentID
  314.     // (the cookie returned from the FRegisterComponent method).
  315.     // Return TRUE if successful, FALSE otherwise.
  316.     STDMETHOD_(BOOL, FRevokeComponent) (THIS_ DWORD dwComponentID) PURE;
  317.     
  318.     // Update the registration info of the component identified by
  319.     // dwComponentID (the cookie returned from FRegisterComponent) with the
  320.     // new registration information pcrinfo.
  321.     // Typically this is used to update the idle time registration data, but
  322.     // can be used to update other registration data as well.
  323.     // Return TRUE if successful, FALSE otherwise.
  324.     STDMETHOD_(BOOL, FUpdateComponentRegistration) (THIS_ 
  325.         DWORD dwComponentID, const CMGRRINFO *pcrinfo) PURE;
  326.     
  327.     // Notify component manager that component identified by dwComponentID
  328.     // (cookie returned from FRegisterComponent) has been activated.
  329.     // The active component gets the chance to process messages before they
  330.     // are dispatched (via IOleComponent::FPreTranslateMessage) and typically
  331.     // gets first crack at idle time after the host.
  332.     STDMETHOD_(void, OnComponentActivate) (THIS_ DWORD dwComponentID) PURE;
  333.     
  334.     // Called to inform component manager that  component identified by 
  335.     // dwComponentID (cookie returned from FRegisterComponent) wishes
  336.     // to perform a tracking operation (such as mouse tracking).
  337.     // The component calls this method with fTrack == TRUE to begin the
  338.     // tracking operation and with fTrack == FALSE to end the operation.
  339.     // During the tracking operation the component manager routes messages
  340.     // to the tracking component (via IOleComponent::FPreTranslateMessage)
  341.     // rather than to the active component.  When the tracking operation ends,
  342.     // the component manager should resume routing messages to the active
  343.     // component.  
  344.     // Note: component manager should perform no idle time processing during a
  345.     // tracking operation other than give the tracking component idle
  346.     // time via IOleComponent::FDoIdle.
  347.     // Note: there can only be one tracking component at a time.
  348.     // Return TRUE if successful, FALSE otherwise.
  349.     STDMETHOD_(BOOL, FSetTrackingComponent) (THIS_ 
  350.         DWORD dwComponentID, BOOL fTrack) PURE;
  351.  
  352.     // Notify component manager that component identified by dwComponentID
  353.     // (cookie returned from FRegisterComponent) is entering the state
  354.     // identified by uStateID (cmgrstateXXX value).  (For convenience when
  355.     // dealing with sub CompMgrs, the host can call this method passing 0 for
  356.     // dwComponentID.)  
  357.     // Component manager should notify all other interested components within
  358.     // the state context indicated by uContext (a cmgrcontextXXX value),
  359.     // excluding those within the state context of a CompMgr in rgpicmExclude,
  360.     // via IOleComponent::OnEnterState (see "Comments on State Contexts", 
  361.     // above).
  362.     // Component Manager should also take appropriate action depending on the 
  363.     // value of uStateID (see cmgrstate comments, above).
  364.     // dwReserved is reserved for future use and should be zero.
  365.         // 
  366.     // rgpicmExclude (can be NULL) is an array of cpicmExclude CompMgrs (can
  367.     // include root CompMgr and/or sub CompMgrs); components within the state
  368.     // context of a CompMgr appearing in this    array should NOT be notified of 
  369.     // the state change (note: if uContext    is cmgrcontextMine, the only 
  370.     // CompMgrs in rgpicmExclude that are checked for exclusion are those that 
  371.     // are sub CompMgrs of this Component Manager, since all other CompMgrs 
  372.     // are outside of this Component Manager's state context anyway.)
  373.         // 
  374.     // Note: Calls to this method are symmetric with calls to 
  375.     // FOnComponentExitState. 
  376.     // That is, if n OnComponentEnterState calls are made, the component is
  377.     // considered to be in the state until n FOnComponentExitState calls are
  378.     // made.  Before revoking its registration a component must make a 
  379.     // sufficient number of FOnComponentExitState calls to offset any
  380.     // outstanding OnComponentEnterState calls it has made.
  381.         // 
  382.     // Note: inplace objects should not call this method with
  383.     // uStateID == cmgrstateModal when entering modal state. Such objects
  384.     // should call IOleInPlaceFrame::EnableModeless instead.
  385.     STDMETHOD_(void, OnComponentEnterState) (THIS_ 
  386.         DWORD dwComponentID, 
  387.         ULONG uStateID, 
  388.         ULONG uContext,
  389.         ULONG cpicmExclude,
  390.         IOleComponentManager **rgpicmExclude, 
  391.         DWORD dwReserved) PURE;
  392.     
  393.     // Notify component manager that component identified by dwComponentID
  394.     // (cookie returned from FRegisterComponent) is exiting the state
  395.     // identified by uStateID (a cmgrstateXXX value).  (For convenience when
  396.     // dealing with sub CompMgrs, the host can call this method passing 0 for
  397.     // dwComponentID.)
  398.     // uContext, cpicmExclude, and rgpicmExclude are as they are in 
  399.     // OnComponentEnterState.
  400.     // Component manager    should notify all appropriate interested components
  401.     // (taking into account uContext, cpicmExclude, rgpicmExclude) via
  402.     // IOleComponent::OnEnterState (see "Comments on State Contexts", above). 
  403.     // Component Manager should also take appropriate action depending on
  404.     // the value of uStateID (see cmgrstate comments, above).
  405.     // Return TRUE if, at the end of this call, the state is still in effect
  406.     // at the root of this component manager's state context
  407.     // (because the host or some other component is still in the state),
  408.     // otherwise return FALSE (ie. return what FInState would return).
  409.     // Caller can normally ignore the return value.
  410.     // 
  411.     // Note: n calls to this method are symmetric with n calls to 
  412.     // OnComponentEnterState (see OnComponentEnterState comments, above).
  413.     STDMETHOD_(BOOL, FOnComponentExitState) (THIS_ 
  414.         DWORD dwComponentID, 
  415.         ULONG uStateID, 
  416.         ULONG uContext,
  417.         ULONG cpicmExclude,
  418.         IOleComponentManager **rgpicmExclude) PURE;
  419.  
  420.     // Return TRUE if the state identified by uStateID (a cmgrstateXXX value)
  421.     // is in effect at the root of this component manager's state context, 
  422.     // FALSE otherwise (see "Comments on State Contexts", above).
  423.     // pvoid is reserved for future use and should be NULL.
  424.     STDMETHOD_(BOOL, FInState) (THIS_ ULONG uStateID, void *pvoid) PURE;
  425.     
  426.     // Called periodically by a component during IOleComponent::FDoIdle.
  427.     // Return TRUE if component can continue its idle time processing, 
  428.     // FALSE if not (in which case component returns from FDoIdle.)
  429.     STDMETHOD_(BOOL, FContinueIdle) (THIS) PURE;
  430.  
  431.     // Component identified by dwComponentID (cookie returned from 
  432.     // FRegisterComponent) wishes to push a message loop for reason uReason.
  433.     // uReason is one the values from the cmgrloop enumeration (above).
  434.     // pvLoopData is data private to the component.
  435.     // The host should push its message loop, 
  436.     // calling IOleComponent::FContinueMessageLoop(uReason, pvLoopData)
  437.     // once per loop iteration.  When IOleComponent::FContinueMessageLoop
  438.     // returns FALSE, the host should terminate the loop.
  439.     STDMETHOD_(BOOL, FPushMessageLoop) (THIS_ 
  440.         DWORD dwComponentID, ULONG uReason, void *pvLoopData) PURE;
  441.  
  442.     // Cause the component manager to create a "sub" component manager, which
  443.     // will be one of its children in the hierarchical tree of component
  444.     // managers used to maintiain state contexts (see "Comments on State
  445.     // Contexts", above).
  446.     // piunkOuter is the controlling unknown (can be NULL), riid is the
  447.     // desired IID, and *ppvObj returns the created sub component manager.
  448.     // piunkServProv (can be NULL) is a ptr to an object supporting
  449.     // IServiceProvider interface to which the created sub component manager
  450.     // will delegate its IOleComponentManager::QueryService calls. 
  451.     // (see objext.h or docobj.h for definition of IServiceProvider).
  452.     // Returns TRUE if successful.
  453.     STDMETHOD_(BOOL, FCreateSubComponentManager) (THIS_ 
  454.         IUnknown *piunkOuter, 
  455.         IUnknown *piunkServProv,
  456.         REFIID riid, 
  457.         void **ppvObj) PURE;
  458.  
  459.     // Return in *ppicm an AddRef'ed ptr to this component manager's parent
  460.     // in the hierarchical tree of component managers used to maintain state
  461.     // contexts (see "Comments on State Contexts", above).
  462.     // Returns TRUE if the parent is returned, FALSE if no parent exists or
  463.     // some error occurred.
  464.     STDMETHOD_(BOOL, FGetParentComponentManager) (THIS_ 
  465.         IOleComponentManager **ppicm) PURE;
  466.  
  467.     // Return in *ppic an AddRef'ed ptr to the current active component.
  468.     // Returns TRUE if the active component is returned, FALSE if no component
  469.     // is active or some error occurred.
  470.     // dwReserved is reserved for future use and should be zero.
  471.     STDMETHOD_(BOOL, FGetActiveComponent) (THIS_ 
  472.         DWORD dwReserved, IOleComponent **ppic) PURE;
  473.     };
  474.  
  475. //--- EOF -------------------------------------------------------------------
  476.