Udostępnij za pośrednictwem


COleDispatchDriver::COleDispatchDriver

Constructs a COleDispatchDriver object.

COleDispatchDriver( );
COleDispatchDriver(
   LPDISPATCH lpDispatch,
   BOOL bAutoRelease = TRUE 
);
COleDispatchDriver(
   const COleDispatchDriver& dispatchSrc 
);

Parameters

  • lpDispatch
    Pointer to an OLE IDispatch object to be attached to the COleDispatchDriver object.

  • bAutoRelease
    Specifies whether the dispatch is to be released when this object goes out of scope.

  • dispatchSrc
    Reference to an existing COleDispatchDriver object.

Remarks

The form COleDispatchDriver(LPDISPATCH lpDispatch, BOOL bAutoRelease = TRUE) connects the IDispatch interface.

The form COleDispatchDriver(const COleDispatchDriver& dispatchSrc) copies an existing COleDispatchDriver object and increments the reference count.

The form COleDispatchDriver( ) creates a COleDispatchDriver object but does not connect the IDispatch interface. Before using COleDispatchDriver( ) without arguments, you should connect an IDispatch to it using either COleDispatchDriver::CreateDispatch or COleDispatchDriver::AttachDispatch. For more information, see Implementing the IDispatch Interface [Automation].

Example

See the example for COleDispatchDriver::CreateDispatch.

Requirements

Header: afxdisp.h

See Also

Reference

COleDispatchDriver Class

Hierarchy Chart

COleDispatchDriver::AttachDispatch

COleDispatchDriver::CreateDispatch

Other Resources

COleDispatchDriver Members