CComPtr::CComPtr

CComPtr( );

CComPtr( T* lp );

CComPtr ( const CComPtr< T >& lp );

Parameters

lp

[in] Used to initialize the interface pointer, p.

T

[in] A COM interface.

Remarks

The default constructor sets p to NULL. The copy constructor sets p to the member pointer of lp and calls AddRef through p. If you pass a pointer type derived from T, the constructor sets p to the T* parameter and calls AddRef.

The destructor calls Release through p.

CComPtr OverviewClass Members