COleDispatchDriver::DetachDispatch
Detaches the current IDispatch connection from this object.
LPDISPATCH DetachDispatch( );
Return Value
A pointer to the previously attached OLE IDispatch object.
Remarks
The IDispatch is not released.
For more information about the LPDISPATCH type, see Implementing the IDispatch Interface in the Windows SDK.
Example
LPDISPATCH CreateLPDispatch(LPCTSTR lpszProgId)
{
COleDispatchDriver disp;
disp.CreateDispatch(lpszProgId);
return disp.DetachDispatch();
}
Requirements
Header: afxdisp.h
See Also
Concepts
COleDispatchDriver::ReleaseDispatch
COleDispatchDriver::CreateDispatch