Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ComPtr::operator!= Operator


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on

The latest version of this topic can be found at ComPtr::operator!= Operator.

Indicates whether two ComPtr objects are not equal.

bool operator!=(  
   const ComPtr<T>& a,  
   const ComPtr<U>& b  
bool operator!=(  
   const ComPtr<T>& a,  
bool operator!=(  
   const ComPtr<T>& a  


A reference to a ComPtr object.

A reference to another ComPtr object.

The first operator yields true if object a is not equal to object b; otherwise, false.

The second and third operators yield true if object a is not equal to nullptr; otherwise, false.

Header: client.h

Namespace: Microsoft::WRL

Microsoft::WRL Namespace
ComPtr Class

© 2018 Microsoft