Udostępnij za pośrednictwem


CComPtrBase::CopyTo

Call this method to copy the CComPtrBase pointer to another pointer variable.

HRESULT CopyTo( 
   T** ppT  
) throw( );

Parameters

  • ppT
    Address of the variable which will receive the CComPtrBase pointer.

Return Value

Returns S_OK on success, E_POINTER on failure.

Remarks

Copies the CComPtrBase pointer to ppT. The reference count on the CComPtrBase::p member variable is incremented.

An error HRESULT will be returned if ppT is equal to NULL. In debug builds, an assertion error will occur if ppT is equal to NULL.

Requirements

Header: atlcomcli.h

See Also

Reference

CComPtrBase Class

Other Resources

CComPtrBase Members