Share via


COleDispatchDriver::DetachDispatch

desasocia la conexión actual de IDispatch de este objeto.

LPDISPATCH DetachDispatch( );

Valor devuelto

Un puntero al objeto previamente asociado de OLE IDispatch .

Comentarios

IDispatch no se libera.

Para obtener más información sobre el tipo de LPDISPATCH , vea Implementing the IDispatch Interface en Windows SDK.

Ejemplo

LPDISPATCH CreateLPDispatch(LPCTSTR lpszProgId)
{
    COleDispatchDriver disp;

    disp.CreateDispatch(lpszProgId);

    return disp.DetachDispatch();
}

Requisitos

encabezado: afxdisp.h

Vea también

Referencia

COleDispatchDriver Class

Gráfico de jerarquías

COleDispatchDriver::ReleaseDispatch

COleDispatchDriver::CreateDispatch

COleDispatchDriver::AttachDispatch

COleDispatchDriver::m_lpDispatch