CComDispatchDriver::operator =

IDispatch* operator =( IDispatch* lp ) ;

IDispatch* operator =( IUnknown* lp ) ;

Remarks

Sets the data member p to an IDispatch interface pointer or to a pointer to an IDispatch interface obtained through an IUnknown pointer.

If p already points to an IDispatch interface, that interface is first released.

For example, if the CComDispatchDriver object is pDD and an IDispatch pointer is pMyDisp, pDD=pMyDisp sets pDD.p to pMyDisp. If an IUnknown pointer is pMyUnk, pDD=pMyUnk sets pDD.p to point to the IDispatch queried for on pMyUnk, that is:

pMyUnk->QueryInterface(IID_IDispatch, (void**)pDD.p);

CComDispatchDriver OverviewClass Members