COleDispatchDriver Class

Implements the client side of OLE automation.

class COleDispatchDriver

Members

Public Constructors

Name

Description

COleDispatchDriver::COleDispatchDriver

Constructs a COleDispatchDriver object.

Public Methods

Name

Description

COleDispatchDriver::AttachDispatch

Attaches an IDispatch connection to the COleDispatchDriver object.

COleDispatchDriver::CreateDispatch

Creates an IDispatch connection and attaches it to the COleDispatchDriver object.

COleDispatchDriver::DetachDispatch

Detaches an IDispatch connection, without releasing it.

COleDispatchDriver::GetProperty

Gets an automation property.

COleDispatchDriver::InvokeHelper

Helper for calling automation methods.

COleDispatchDriver::ReleaseDispatch

Releases an IDispatch connection.

COleDispatchDriver::SetProperty

Sets an automation property.

Public Operators

Name

Description

COleDispatchDriver::operator =

Copies the source value into the COleDispatchDriver object.

COleDispatchDriver::operator LPDISPATCH

Accesses the underlying IDispatch pointer.

Public Data Members

Name

Description

COleDispatchDriver::m_bAutoRelease

Specifies whether to release the IDispatch during ReleaseDispatch or object destruction.

COleDispatchDriver::m_lpDispatch

Indicates the pointer to the IDispatch interface attached to this COleDispatchDriver.

Remarks

COleDispatchDriver does not have a base class.

OLE dispatch interfaces provide access to an object's methods and properties. Member functions of COleDispatchDriver attach, detach, create, and release a dispatch connection of type IDispatch. Other member functions use variable argument lists to simplify calling IDispatch::Invoke.

This class can be used directly, but it is generally used only by classes created by the Add Class wizard. When you create new C++ classes by importing a type library, the new classes are derived from COleDispatchDriver.

For more information on using COleDispatchDriver, see the following articles:

Inheritance Hierarchy

COleDispatchDriver

Requirements

Header: afxdisp.h

See Also

Reference

Hierarchy Chart

CCmdTarget Class

Concepts

MFC Sample CALCDRIV

MFC Sample ACDUAL