Compartilhar via


ComPtrRef Class

Supports the WRL infrastructure and is not intended to be used directly from your code.

template <
   typename T
>
class ComPtrRef : public ComPtrRefBase<T>;

Parameters

  • T
    A ComPtr<T> type or a type derived from it, not merely the interface represented by the ComPtr.

Remarks

Represents a reference to an object of type ComPtr<T>.

Members

Public Constructors

Name

Description

ComPtrRef::ComPtrRef Constructor

Initializes a new instance of the ComPtrRef class from the specified pointer to another ComPtrRef object.

Public Methods

Name

Description

ComPtrRef::GetAddressOf Method

Retrieves the address of a pointer to the interface represented by the current ComPtrRef object.

ComPtrRef::ReleaseAndGetAddressOf Method

Deletes the current ComPtrRef object and returns a pointer-to-a-pointer to the interface that was represented by the ComPtrRef object.

Public Operators

Name

Description

ComPtrRef::operator InterfaceType** Operator

Deletes the current ComPtrRef object and returns a pointer-to-a-pointer to the interface that was represented by the ComPtrRef object.

ComPtrRef::operator T* Operator

Returns the value of the ptr_ data member of the current ComPtrRef object.

ComPtrRef::operator void** Operator

Deletes the current ComPtrRef object, casts the pointer to the interface that was represented by the ComPtrRef object as a pointer-to-pointer-to void, and then returns the cast pointer.

ComPtrRef::operator* Operator

Retrieves the pointer to the interface represented by the current ComPtrRef object.

ComPtrRef::operator== Operator

Indicates whether two ComPtrRef objects are equal.

ComPtrRef::operator!= Operator

Indicates whether two ComPtrRef objects are not equal.

Inheritance Hierarchy

ComPtrRefBase

ComPtrRef

Requirements

Header: client.h

Namespace: Microsoft::WRL::Details

See Also

Reference

Microsoft::WRL::Details Namespace