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
Copy file name to clipboardExpand all lines: docs/windows/comptr-asiid-method.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ ms.author: "mblome"
13
13
ms.workload: ["cplusplus", "uwp"]
14
14
---
15
15
# ComPtr::AsIID Method
16
-
Returns a ComPtr object that represents the interface identified by the specified interface ID.
16
+
Returns a **ComPtr** object that represents the interface identified by the specified interface ID.
17
17
18
18
## Syntax
19
19
@@ -25,11 +25,11 @@ WRL_NOTHROW HRESULT AsIID(
25
25
```
26
26
27
27
#### Parameters
28
-
`riid`
28
+
*riid*
29
29
An interface ID.
30
30
31
-
`p`
32
-
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.
31
+
*p*
32
+
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`.
33
33
34
34
## Return Value
35
35
S_OK if successful; otherwise, an HRESULT that indicates the error.
Copy file name to clipboardExpand all lines: docs/windows/comptr-class.md
+28-28Lines changed: 28 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ ms.author: "mblome"
13
13
ms.workload: ["cplusplus", "uwp"]
14
14
---
15
15
# ComPtr Class
16
-
Creates a *smart pointer* type that represents the interface specified by the template parameter. ComPtr automatically maintains a reference count for the underlying interface pointer and releases the interface when the reference count goes to zero.
16
+
Creates a *smart pointer* type that represents the interface specified by the template parameter. **ComPtr** automatically maintains a reference count for the underlying interface pointer and releases the interface when the reference count goes to zero.
17
17
18
18
## Syntax
19
19
@@ -26,71 +26,71 @@ friend class ComPtr;
26
26
```
27
27
28
28
#### Parameters
29
-
`T`
30
-
The interface that the ComPtr represents.
29
+
*T*
30
+
The interface that the **ComPtr** represents.
31
31
32
-
`U`
33
-
A class to which the current ComPtr is a friend. (The template that uses this parameter is protected.)
32
+
*U*
33
+
A class to which the current **ComPtr** is a friend. (The template that uses this parameter is protected.)
34
34
35
35
## Remarks
36
-
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.
36
+
`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.
37
37
38
-
For more information about smart pointers, see the "COM Smart Pointers" subsection of the [COM Coding Practices](http://msdn.microsoft.com/en-us/76aca556-b4d6-4e67-a2a3-4439900f0c39)topic in the MSDN Library.
38
+
For more information about smart pointers, see the "COM Smart Pointers" subsection of the [COM Coding Practices](http://msdn.microsoft.com/76aca556-b4d6-4e67-a2a3-4439900f0c39)topic in the MSDN Library.
39
39
40
40
## Members
41
41
42
42
### Public Typedefs
43
43
44
44
|Name|Description|
45
45
|----------|-----------------|
46
-
|`InterfaceType`|A synonym for the type specified by the `T` template parameter.|
46
+
|`InterfaceType`|A synonym for the type specified by the *T* template parameter.|
47
47
48
48
### Public Constructors
49
49
50
50
|Name|Description|
51
51
|----------|-----------------|
52
-
|[ComPtr::ComPtr Constructor](../windows/comptr-comptr-constructor.md)|Intializes a new instance of the ComPtr class. Overloads provide default, copy, move, and conversion constructors.|
53
-
|[ComPtr::~ComPtr Destructor](../windows/comptr-tilde-comptr-destructor.md)|Deinitializes an instance of ComPtr.|
52
+
|[ComPtr::ComPtr Constructor](../windows/comptr-comptr-constructor.md)|Intializes a new instance of the **ComPtr** class. Overloads provide default, copy, move, and conversion constructors.|
53
+
|[ComPtr::~ComPtr Destructor](../windows/comptr-tilde-comptr-destructor.md)|Deinitializes an instance of **ComPtr**.|
54
54
55
55
### Public Methods
56
56
57
57
|Name|Description|
58
58
|----------|-----------------|
59
-
|[ComPtr::As Method](../windows/comptr-as-method.md)|Returns a ComPtr object that represents the interface identified by the specified template parameter.|
60
-
|[ComPtr::AsIID Method](../windows/comptr-asiid-method.md)|Returns a ComPtr object that represents the interface identified by the specified interface ID.|
59
+
|[ComPtr::As Method](../windows/comptr-as-method.md)|Returns a **ComPtr** object that represents the interface identified by the specified template parameter.|
60
+
|[ComPtr::AsIID Method](../windows/comptr-asiid-method.md)|Returns a **ComPtr** object that represents the interface identified by the specified interface ID.|
61
61
|[ComPtr::AsWeak Method](../windows/comptr-asweak-method.md)|Retrieves a weak reference to the current object.|
62
-
|[ComPtr::Attach Method](../windows/comptr-attach-method.md)|Associates this ComPtr with the interface type specified by the current template type parameter.|
63
-
|[ComPtr::CopyTo Method](../windows/comptr-copyto-method.md)|Copies the current or specified interface associated with this ComPtr to the specified output pointer.|
64
-
|[ComPtr::Detach Method](../windows/comptr-detach-method.md)|Disassociates this ComPtr from the interface that it represents.|
65
-
|[ComPtr::Get Method](../windows/comptr-get-method.md)|Retrieves a pointer to the interface that is associated with this ComPtr.|
66
-
|[ComPtr::GetAddressOf Method](../windows/comptr-getaddressof-method.md)|Retrieves the address of the [ptr_](../windows/comptr-ptr-data-member.md) data member, which contains a pointer to the interface represented by this ComPtr.|
67
-
|[ComPtr::ReleaseAndGetAddressOf Method](../windows/comptr-releaseandgetaddressof-method.md)|Releases the interface associated with this ComPtr and then retrieves the address of the [ptr_](../windows/comptr-ptr-data-member.md) data member, which contains a pointer to the interface that was released.|
68
-
|[ComPtr::Reset](../windows/comptr-reset.md)|Releases all references for the pointer to the interface that is associated with this ComPtr.|
69
-
|[ComPtr::Swap Method](../windows/comptr-swap-method.md)|Exchanges the interface managed by the current ComPtr with the interface managed by the specified ComPtr.|
62
+
|[ComPtr::Attach Method](../windows/comptr-attach-method.md)|Associates this **ComPtr** with the interface type specified by the current template type parameter.|
63
+
|[ComPtr::CopyTo Method](../windows/comptr-copyto-method.md)|Copies the current or specified interface associated with this **ComPtr** to the specified output pointer.|
64
+
|[ComPtr::Detach Method](../windows/comptr-detach-method.md)|Disassociates this **ComPtr** from the interface that it represents.|
65
+
|[ComPtr::Get Method](../windows/comptr-get-method.md)|Retrieves a pointer to the interface that is associated with this **ComPtr**.|
66
+
|[ComPtr::GetAddressOf Method](../windows/comptr-getaddressof-method.md)|Retrieves the address of the [ptr_](../windows/comptr-ptr-data-member.md) data member, which contains a pointer to the interface represented by this **ComPtr**.|
67
+
|[ComPtr::ReleaseAndGetAddressOf Method](../windows/comptr-releaseandgetaddressof-method.md)|Releases the interface associated with this **ComPtr** and then retrieves the address of the [ptr_](../windows/comptr-ptr-data-member.md) data member, which contains a pointer to the interface that was released.|
68
+
|[ComPtr::Reset](../windows/comptr-reset.md)|Releases all references for the pointer to the interface that is associated with this **ComPtr**.|
69
+
|[ComPtr::Swap Method](../windows/comptr-swap-method.md)|Exchanges the interface managed by the current **ComPtr** with the interface managed by the specified **ComPtr**.|
70
70
71
71
### Protected Methods
72
72
73
73
|Name|Description|
74
74
|----------|-----------------|
75
-
|[ComPtr::InternalAddRef Method](../windows/comptr-internaladdref-method.md)|Increments the reference count of the interface associated with this ComPtr.|
76
-
|[ComPtr::InternalRelease Method](../windows/comptr-internalrelease-method.md)|Performs a COM Release operation on the interface associated with this ComPtr.|
75
+
|[ComPtr::InternalAddRef Method](../windows/comptr-internaladdref-method.md)|Increments the reference count of the interface associated with this **ComPtr**.|
76
+
|[ComPtr::InternalRelease Method](../windows/comptr-internalrelease-method.md)|Performs a COM Release operation on the interface associated with this **ComPtr**.|
77
77
78
78
### Public Operators
79
79
80
80
|Name|Description|
81
81
|----------|-----------------|
82
-
|[ComPtr::operator Microsoft::WRL::Details::BoolType Operator](../windows/comptr-operator-microsoft-wrl-details-booltype-operator.md)|Indicates whether or not a ComPtr is managing the object lifetime of an interface.|
83
-
|[ComPtr::operator& Operator](../windows/comptr-operator-ampersand-operator.md)|Retrieves the address of the current ComPtr.|
84
-
|[ComPtr::operator= Operator](../windows/comptr-operator-assign-operator.md)|Assigns a value to the current ComPtr.|
82
+
|[ComPtr::operator Microsoft::WRL::Details::BoolType Operator](../windows/comptr-operator-microsoft-wrl-details-booltype-operator.md)|Indicates whether or not a **ComPtr** is managing the object lifetime of an interface.|
83
+
|[ComPtr::operator& Operator](../windows/comptr-operator-ampersand-operator.md)|Retrieves the address of the current **ComPtr**.|
84
+
|[ComPtr::operator= Operator](../windows/comptr-operator-assign-operator.md)|Assigns a value to the current **ComPtr**.|
85
85
|[ComPtr::operator-> Operator](../windows/comptr-operator-arrow-operator.md)|Retrieves a pointer to the type specified by the current template parameter.|
86
-
|[ComPtr::operator== Operator](../windows/comptr-operator-equality-operator.md)|Indicates whether two ComPtr objects are equal.|
87
-
|[ComPtr::operator!= Operator](../windows/comptr-operator-inequality-operator.md)|Indicates whether two ComPtr objects are not equal.|
86
+
|[ComPtr::operator== Operator](../windows/comptr-operator-equality-operator.md)|Indicates whether two **ComPtr** objects are equal.|
87
+
|[ComPtr::operator!= Operator](../windows/comptr-operator-inequality-operator.md)|Indicates whether two **ComPtr** objects are not equal.|
88
88
89
89
### Protected Data Members
90
90
91
91
|Name|Description|
92
92
|----------|-----------------|
93
-
|[ComPtr::ptr_ Data Member](../windows/comptr-ptr-data-member.md)|Contains a pointer to the interface that is associated with, and managed by this ComPtr.|
93
+
|[ComPtr::ptr_ Data Member](../windows/comptr-ptr-data-member.md)|Contains a pointer to the interface that is associated with, and managed by this **ComPtr**.|
Copy file name to clipboardExpand all lines: docs/windows/comptr-copyto-method.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ ms.author: "mblome"
13
13
ms.workload: ["cplusplus", "uwp"]
14
14
---
15
15
# ComPtr::CopyTo Method
16
-
Copies the current or specified interface associated with this ComPtr to the specified pointer.
16
+
Copies the current or specified interface associated with this **ComPtr** to the specified pointer.
17
17
18
18
## Syntax
19
19
@@ -34,24 +34,24 @@ HRESULT CopyTo(
34
34
```
35
35
36
36
#### Parameters
37
-
`U`
37
+
*U*
38
38
A type name.
39
39
40
-
`ptr`
40
+
*ptr*
41
41
When this operation completes, a pointer to the requested interface.
42
42
43
-
`riid`
43
+
*riid*
44
44
An interface ID.
45
45
46
46
## Return Value
47
-
S_OK if successful; otherwise, an HRESULT that indicates why the implicit QueryInterface operation failed.
47
+
S_OK if successful; otherwise, an HRESULT that indicates why the implicit `QueryInterface` operation failed.
48
48
49
49
## Remarks
50
-
The first function returns a copy of a pointer to the interface associated with this ComPtr. This function always returns S_OK.
50
+
The first function returns a copy of a pointer to the interface associated with this **ComPtr**. This function always returns S_OK.
51
51
52
-
The second function performs a QueryInterface operation on the interface associated with this ComPtr for the interface specified by the `riid` parameter.
52
+
The second function performs a `QueryInterface` operation on the interface associated with this **ComPtr** for the interface specified by the *riid* parameter.
53
53
54
-
The third function performs a QueryInterface operation on the interface associated with this ComPtr for the underlying interface of the `U` parameter.
54
+
The third function performs a `QueryInterface` operation on the interface associated with this **ComPtr** for the underlying interface of the *U* parameter.
Copy file name to clipboardExpand all lines: docs/windows/comptr-getaddressof-method.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ ms.author: "mblome"
13
13
ms.workload: ["cplusplus", "uwp"]
14
14
---
15
15
# ComPtr::GetAddressOf Method
16
-
Retrieves the address of the [ptr_](../windows/comptr-ptr-data-member.md) data member, which contains a pointer to the interface represented by this ComPtr.
16
+
Retrieves the address of the [ptr_](../windows/comptr-ptr-data-member.md) data member, which contains a pointer to the interface represented by this **ComPtr**.
0 commit comments