COleDispatchDriver::CreateDispatch

BOOL CreateDispatch( REFCLSID clsid, COleException* pError = NULL );

BOOL CreateDispatch( LPCTSTR lpszProgID, COleException* pError = NULL );

Return Value

Nonzero on success; otherwise 0.

Parameters

clsid

Class ID of the IDispatch connection object to be created.

pError

Pointer to an OLE exception object, which will hold the status code resulting from the creation.

lpszProgID

Pointer to the programmatic identifier, such as “Excel.Document.5”, of the automation object for which the dispatch object is to be created.

Remarks

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

COleDispatchDriver OverviewClass MembersHierarchy Chart

See Also   COleDispatchDriver::DetachDispatch, COleDispatchDriver::ReleaseDispatch, COleDispatchDriver::AttachDispatch, COleException, COleDispatchDriver::m_lpDispatch