Skip to content

Commit 6ccc557

Browse files
authored
Merge pull request MicrosoftDocs#1339 from DennisLee-DennisLee/v-dele-1338191-Implements
1338191: Consolidated the Implements structure tree into one topic.
2 parents 301895b + 132c318 commit 6ccc557

7 files changed

+106
-193
lines changed

.openpublishing.redirection.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6230,6 +6230,26 @@
62306230
"redirect_url": "/cpp/windows/overview-of-windows-programming-in-cpp",
62316231
"redirect_document_id": false
62326232
},
6233+
{
6234+
"source_path": "docs/windows/implements-cancastto-method.md",
6235+
"redirect_url": "/cpp/windows/implements-structure#cancastto",
6236+
"redirect_document_id": false
6237+
},
6238+
{
6239+
"source_path": "docs/windows/implements-casttounknown-method.md",
6240+
"redirect_url": "/cpp/windows/implements-structure#casttounknown",
6241+
"redirect_document_id": false
6242+
},
6243+
{
6244+
"source_path": "docs/windows/implements-fillarraywithiid-method.md",
6245+
"redirect_url": "/cpp/windows/implements-structure#fillarraywithiid",
6246+
"redirect_document_id": false
6247+
},
6248+
{
6249+
"source_path": "docs/windows/implements-iidcount-constant.md",
6250+
"redirect_url": "/cpp/windows/implements-structure#iidcount",
6251+
"redirect_document_id": false
6252+
},
62336253
{
62346254
"source_path": "docs/windows/runtimeclass-tilde-runtimeclass-destructor.md",
62356255
"redirect_url": "/cpp/windows/runtimeclass-class#tilde-runtimeclass",

docs/windows/TOC.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,10 +396,6 @@
396396
###### [FtmBase::UnmarshalInterface Method](ftmbase-unmarshalinterface-method.md)
397397
##### [GetModuleBase Function](getmodulebase-function.md)
398398
##### [Implements Structure](implements-structure.md)
399-
###### [Implements::CanCastTo Method](implements-cancastto-method.md)
400-
###### [Implements::CastToUnknown Method](implements-casttounknown-method.md)
401-
###### [Implements::FillArrayWithIid Method](implements-fillarraywithiid-method.md)
402-
###### [Implements::IidCount Constant](implements-iidcount-constant.md)
403399
##### [InspectableClass Macro](inspectableclass-macro.md)
404400
##### [InvokeModeOptions Structure](invokemodeoptions-structure.md)
405401
##### [Make Function](make-function.md)

docs/windows/implements-cancastto-method.md

Lines changed: 0 additions & 52 deletions
This file was deleted.

docs/windows/implements-casttounknown-method.md

Lines changed: 0 additions & 41 deletions
This file was deleted.

docs/windows/implements-fillarraywithiid-method.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

docs/windows/implements-iidcount-constant.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

docs/windows/implements-structure.md

Lines changed: 86 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
title: "Implements Structure | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "11/04/2016"
4+
ms.date: "09/11/2018"
55
ms.technology: ["cpp-windows"]
66
ms.topic: "reference"
7-
f1_keywords: ["implements/Microsoft::WRL::Implements"]
7+
f1_keywords: ["implements/Microsoft::WRL::Implements", "implements/Microsoft::WRL::Implements::CanCastTo", "implements/Microsoft::WRL::Implements::CastToUnknown", "implements/Microsoft::WRL::Implements::FillArrayWithIid", "implements/Microsoft::WRL::Implements::IidCount"]
88
dev_langs: ["C++"]
9-
helpviewer_keywords: ["Implements structure"]
9+
helpviewer_keywords: ["Microsoft::WRL::Implements structure", "Microsoft::WRL::Implements::CanCastTo method", "Microsoft::WRL::Implements::CastToUnknown method", "Microsoft::WRL::Implements::FillArrayWithIid method", "Microsoft::WRL::Implements::IidCount method"]
1010
ms.assetid: 29b13e90-34d4-4a0b-babd-5187c9eb0c36
1111
author: "mikeblome"
1212
ms.author: "mblome"
@@ -92,23 +92,23 @@ Each *I0* through *I9* interface parameter must derive from either `IUnknown`, `
9292

9393
### Public Typedefs
9494

95-
|Name|Description|
96-
|----------|-----------------|
97-
|`ClassFlags`|A synonym for `RuntimeClassFlags<WinRt>`.|
95+
| Name | Description |
96+
| ----------- | ----------------------------------------- |
97+
| `ClassFlags`| A synonym for `RuntimeClassFlags<WinRt>`. |
9898

9999
### Protected Methods
100100

101-
|Name|Description|
102-
|----------|-----------------|
103-
|[Implements::CanCastTo Method](../windows/implements-cancastto-method.md)|Gets a pointer to the specified interface.|
104-
|[Implements::CastToUnknown Method](../windows/implements-casttounknown-method.md)|Gets a pointer to the underlying `IUnknown` interface.|
105-
|[Implements::FillArrayWithIid Method](../windows/implements-fillarraywithiid-method.md)|Inserts the interface ID specified by the current zeroth template parameter into the specified array element.|
101+
| Name | Description |
102+
| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
103+
| [Implements::CanCastTo](#cancastto) | Gets a pointer to the specified interface. |
104+
| [Implements::CastToUnknown](#casttounknown) | Gets a pointer to the underlying `IUnknown` interface. |
105+
| [Implements::FillArrayWithIid](#fillarraywithiid) | Inserts the interface ID specified by the current zeroth template parameter into the specified array element. |
106106

107107
### Protected Constants
108108

109-
|Name|Description|
110-
|----------|-----------------|
111-
|[Implements::IidCount Constant](../windows/implements-iidcount-constant.md)|Holds the number of implemented interface IDs.|
109+
| Name | Description |
110+
| --------------------------------- | ---------------------------------------------- |
111+
| [Implements::IidCount](#iidcount) | Holds the number of implemented interface IDs. |
112112

113113
## Inheritance Hierarchy
114114

@@ -130,6 +130,76 @@ Each *I0* through *I9* interface parameter must derive from either `IUnknown`, `
130130

131131
**Namespace:** Microsoft::WRL
132132

133-
## See Also
133+
## <a name="cancastto"></a>Implements::CanCastTo
134134

135-
[Microsoft::WRL Namespace](../windows/microsoft-wrl-namespace.md)
135+
Gets a pointer to the specified interface.
136+
137+
```cpp
138+
__forceinline HRESULT CanCastTo(
139+
REFIID riid,
140+
_Deref_out_ void **ppv
141+
);
142+
```
143+
144+
### Parameters
145+
146+
*riid*
147+
A reference to an interface ID.
148+
149+
*ppv*
150+
If successful, a pointer to the interface specified by *riid*.
151+
152+
### Return Value
153+
154+
S_OK if successful; otherwise, an HRESULT that indicates the error, such as E_NOINTERFACE.
155+
156+
### Remarks
157+
158+
This is an internal helper function that performs a QueryInterface operation.
159+
160+
## <a name="casttounknown"></a>Implements::CastToUnknown
161+
162+
Gets a pointer to the underlying `IUnknown` interface.
163+
164+
```cpp
165+
__forceinline IUnknown* CastToUnknown();
166+
```
167+
168+
### Return Value
169+
170+
This operation always succeeds and returns the `IUnknown` pointer.
171+
172+
### Remarks
173+
174+
Internal helper function.
175+
176+
## <a name="fillarraywithiid"></a>Implements::FillArrayWithIid
177+
178+
Inserts the interface ID specified by the current zeroth template parameter into the specified array element.
179+
180+
```cpp
181+
__forceinline static void FillArrayWithIid(
182+
unsigned long &index,
183+
_In_ IID* iids
184+
);
185+
```
186+
187+
### Parameters
188+
189+
*index*
190+
A zero-based index that indicates the starting array element for this operation. When this operation completes, *index* is incremented by 1.
191+
192+
*iids*
193+
An array of type IID.
194+
195+
### Remarks
196+
197+
Internal helper function.
198+
199+
## <a name="iidcount"></a>Implements::IidCount
200+
201+
Holds the number of implemented interface IDs.
202+
203+
```cpp
204+
static const unsigned long IidCount;
205+
```

0 commit comments

Comments
 (0)