You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -32,7 +32,7 @@ A class to which the current `ComPtr` is a friend. (The template that uses this
32
32
33
33
`ComPtr<>` declares a type that represents the underlying interface pointer. Use `ComPtr<>` to declare a variable and then use the arrow member-access operator (`->`) to access an interface member function.
34
34
35
-
For more information about smart pointers, see the "COM Smart Pointers" subsection of the [COM Coding Practices](/windows/win32/LearnWin32/com-coding-practices)topic in the MSDN Library.
35
+
For more information about smart pointers, see the "COM Smart Pointers" subsection of the [COM Coding Practices](/windows/win32/LearnWin32/com-coding-practices)article in the MSDN Library.
[ComPtr::ComPtr](#comptr) | Intializes a new instance of the `ComPtr` class. Overloads provide default, copy, move, and conversion constructors.
49
+
[ComPtr::ComPtr](#comptr) | Initializes a new instance of the `ComPtr` class. Overloads provide default, copy, move, and conversion constructors.
50
50
[ComPtr::~ComPtr](#tilde-comptr) | Deinitializes an instance of `ComPtr`.
51
51
52
52
### Public Methods
@@ -62,7 +62,7 @@ Name | Description
62
62
[ComPtr::Get](#get) | Retrieves a pointer to the interface that is associated with this `ComPtr`.
63
63
[ComPtr::GetAddressOf](#getaddressof) | Retrieves the address of the [ptr_](#ptr) data member, which contains a pointer to the interface represented by this `ComPtr`.
64
64
[ComPtr::ReleaseAndGetAddressOf](#releaseandgetaddressof) | Releases the interface associated with this `ComPtr` and then retrieves the address of the [ptr_](#ptr) data member, which contains a pointer to the interface that was released.
65
-
[ComPtr::Reset](#reset) | Releases all references for the pointer to the interface that is associated with this `ComPtr`.
65
+
[ComPtr::Reset](#reset) | Releases the interface associated with this `ComPtr` and returns the new reference count.
66
66
[ComPtr::Swap](#swap) | Exchanges the interface managed by the current `ComPtr` with the interface managed by the specified `ComPtr`.
67
67
68
68
### Protected Methods
@@ -80,8 +80,8 @@ Name
80
80
[ComPtr::operator->](#operator-arrow) | Retrieves a pointer to the type specified by the current template parameter.
81
81
[ComPtr::operator=](#operator-assign) | Assigns a value to the current `ComPtr`.
82
82
[ComPtr::operator==](#operator-equality) | Indicates whether two `ComPtr` objects are equal.
83
-
[ComPtr::operator!=](#operator-inequality) | Indicates whether two `ComPtr` objects are not equal.
84
-
[ComPtr::operator Microsoft::WRL::Details::BoolType](#operator-microsoft-wrl-details-booltype) | Indicates whether or not a `ComPtr` is managing the object lifetime of an interface.
83
+
[ComPtr::operator!=](#operator-inequality) | Indicates whether two `ComPtr` objects aren't equal.
84
+
[ComPtr::operator Microsoft::WRL::Details::BoolType](#operator-microsoft-wrl-details-booltype) | Indicates whether a `ComPtr` is managing the object lifetime of an interface.
85
85
86
86
### Protected Data Members
87
87
@@ -133,7 +133,7 @@ A `ComPtr` object that represents the interface specified by parameter *U*. Para
133
133
134
134
### Remarks
135
135
136
-
The first template is the form that you should use in your code. The second template is an internal, helper specialization that supports C++ language features such as the [auto](../../cpp/auto-cpp.md) type deduction keyword.
136
+
The first template is the form that you should use in your code. The second template is an internal, helper specialization. It supports C++ language features such as the [auto](../../cpp/auto-cpp.md) type deduction keyword.
137
137
138
138
### Return Value
139
139
@@ -156,7 +156,7 @@ WRL_NOTHROW HRESULT AsIID(
156
156
An interface ID.
157
157
158
158
*p*<br/>
159
-
If the object has an interface whose ID equals *riid*, a doubly-indirect pointer to the interface specified by the *riid* parameter; otherwise, a pointer to `IUnknown`.
159
+
If the object has an interface whose ID equals *riid*, a doublyindirect pointer to the interface specified by the *riid* parameter. Otherwise, a pointer to `IUnknown`.
160
160
161
161
### Return Value
162
162
@@ -198,7 +198,7 @@ An interface type.
198
198
199
199
## <aname="comptr"></a> ComPtr::ComPtr
200
200
201
-
Intializes a new instance of the `ComPtr` class. Overloads provide default, copy, move, and conversion constructors.
201
+
Initializes a new instance of the `ComPtr` class. Overloads provide default, copy, move, and conversion constructors.
202
202
203
203
```cpp
204
204
WRL_NOTHROW ComPtr();
@@ -244,13 +244,13 @@ An object of type *U*.
244
244
245
245
### Remarks
246
246
247
-
The first constructor is the default constructor, which implictly creates an empty object. The second constructor specifies [__nullptr](../../extensions/nullptr-cpp-component-extensions.md), which explicitly creates an empty object.
247
+
The first constructor is the default constructor, which implicitly creates an empty object. The second constructor specifies [__nullptr](../../extensions/nullptr-cpp-component-extensions.md), which explicitly creates an empty object.
248
248
249
249
The third constructor creates an object from the object specified by a pointer. The ComPtr now owns the pointed-to memory and maintains a reference count to it.
250
250
251
-
The fourth and fifth constructors are copy constructors. The fifth constructor copies an object if it is convertible to the current type.
251
+
The fourth and fifth constructors are copy constructors. The fifth constructor copies an object if it's convertible to the current type.
252
252
253
-
The sixth and seventh constructors are move constructors. The seventh constructor moves an object if it is convertible to the current type.
253
+
The sixth and seventh constructors are move constructors. The seventh constructor moves an object if it's convertible to the current type.
254
254
255
255
## <aname="copyto"></a> ComPtr::CopyTo
256
256
@@ -349,7 +349,7 @@ This method is protected.
349
349
Performs a COM Release operation on the interface associated with this `ComPtr`.
350
350
351
351
```cpp
352
-
voidInternalRelease();
352
+
unsignedlongInternalRelease();
353
353
```
354
354
355
355
### Remarks
@@ -372,7 +372,7 @@ A weak reference to the current `ComPtr`.
372
372
373
373
### Remarks
374
374
375
-
This method differs from [ComPtr::GetAddressOf](#getaddressof) in that this method releases a reference to the interface pointer. Use `ComPtr::GetAddressOf` when you require the address of the interface pointer but do not want to release that interface.
375
+
This method differs from [ComPtr::GetAddressOf](#getaddressof) in that this method releases a reference to the interface pointer. Use `ComPtr::GetAddressOf` when you require the address of the interface pointer but don't want to release that interface.
@@ -437,11 +437,11 @@ A reference to the current `ComPtr`.
437
437
438
438
The first version of this operator assigns an empty value to the current `ComPtr`.
439
439
440
-
In the second version, if the assigning interface pointer is not the same as the current `ComPtr` interface pointer, the second interface pointer is assigned to the current `ComPtr`.
440
+
In the second version, if the assigning interface pointer isn't the same as the current `ComPtr` interface pointer, the second interface pointer is assigned to the current `ComPtr`.
441
441
442
442
In the third version, the assigning interface pointer is assigned to the current `ComPtr`.
443
443
444
-
In the fourth version, if the interface pointer of the assigning value is not the same as the current `ComPtr` interface pointer, the second interface pointer is assigned to the current `ComPtr`.
444
+
In the fourth version, if the interface pointer of the assigning value isn't the same as the current `ComPtr` interface pointer, the second interface pointer is assigned to the current `ComPtr`.
445
445
446
446
The fifth version is a copy operator; a reference to a `ComPtr` is assigned to the current `ComPtr`.
447
447
@@ -486,7 +486,7 @@ The second and third operators yield `true` if object *a* is equal to `nullptr`;
0 commit comments