共用方式為


CComPtr::operator =

Assignment operator.

T* operator =( 
   T* lp  
) throw ( );  
T* operator =( 
   const CComPtr< T >& lp  
) throw ( );

Return Value

Returns a pointer to the updated CComPtr object

Remarks

This operation AddRefs the new object and releases the existing object, if one exists.

Requirements

Header: atlcomcli.h

See Also

Reference

CComPtr Class

CComPtrBase Class