CComQIPtr::CComQIPtr

CComQIPtr( );

CComQIPtr( T* lp );

CComQIPtr( const CComQIPtr< T, piid >& lp );

CComQIPtr( IUnknown* lp );

Parameters

lp

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

T

[in] A COM interface.

piid

[in] A pointer to the IID of T.

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. If you pass a pointer type not derived from T, the constructor calls QueryInterface to set p to an interface pointer corresponding to piid.

The destructor calls Release through p.

CComQIPtr OverviewClass Members