Skip to content

Commit f381b94

Browse files
committed
Acrolinx and style updates per review
1 parent fc4d57a commit f381b94

File tree

1 file changed

+64
-64
lines changed

1 file changed

+64
-64
lines changed

docs/cppcx/wrl/runtimeclass-class.md

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
description: "Learn more about: RuntimeClass Class"
3-
title: "RuntimeClass Class"
4-
ms.date: "09/11/2018"
2+
description: "Learn more about: RuntimeClass class"
3+
title: "RuntimeClass class"
4+
ms.date: 09/28/2022
55
ms.topic: "reference"
66
f1_keywords: ["implements/Microsoft::WRL::RuntimeClass", "implements/Microsoft::WRL::RuntimeClass::AddRef", "implements/Microsoft::WRL::RuntimeClass::DecrementReference", "implements/Microsoft::WRL::RuntimeClass::GetIids", "implements/Microsoft::WRL::RuntimeClass::GetRuntimeClassName", "implements/Microsoft::WRL::RuntimeClass::GetTrustLevel", "implements/Microsoft::WRL::RuntimeClass::GetWeakReference", "implements/Microsoft::WRL::RuntimeClass::InternalAddRef", "implements/Microsoft::WRL::RuntimeClass::QueryInterface", "implements/Microsoft::WRL::RuntimeClass::Release", "implements/Microsoft::WRL::RuntimeClass::RuntimeClass", "implements/Microsoft::WRL::RuntimeClass::~RuntimeClass"]
77
helpviewer_keywords: ["Microsoft::WRL::RuntimeClass class", "Microsoft::WRL::RuntimeClass::AddRef method", "Microsoft::WRL::RuntimeClass::DecrementReference method", "Microsoft::WRL::RuntimeClass::GetIids method", "Microsoft::WRL::RuntimeClass::GetRuntimeClassName method", "Microsoft::WRL::RuntimeClass::GetTrustLevel method", "Microsoft::WRL::RuntimeClass::GetWeakReference method", "Microsoft::WRL::RuntimeClass::InternalAddRef method", "Microsoft::WRL::RuntimeClass::QueryInterface method", "Microsoft::WRL::RuntimeClass::Release method", "Microsoft::WRL::RuntimeClass::RuntimeClass, constructor", "Microsoft::WRL::RuntimeClass::~RuntimeClass, destructor"]
88
ms.assetid: d52f9d1a-98e5-41f2-a143-8fb629dd0727
99
---
10-
# RuntimeClass Class
10+
# `RuntimeClass` class
1111

1212
Represents a WinRT or COM class that inherits the specified interfaces and provides the specified Windows Runtime, classic COM, and weak reference support.
1313

@@ -22,57 +22,57 @@ template <unsigned int classFlags, typename ...TInterfaces> class RuntimeClass;
2222
2323
### Parameters
2424
25-
*classFlags*<br/>
26-
Optional parameter. A combination of one or more [RuntimeClassType](runtimeclasstype-enumeration.md) enumeration values. The `__WRL_CONFIGURATION_LEGACY__` macro can be defined to change the default value of classFlags for all runtime classes in the project. If defined, RuntimeClass instances are non-agile by default. When not defined, RuntimeClass instances are agile by default. To avoid ambiguity always specify the `Microsoft::WRL::FtmBase` in `TInterfaces` or `RuntimeClassType::InhibitFtmBase`. Note, if InhibitFtmBase and FtmBase are both used the object will be agile.
25+
*`classFlags`*\
26+
Optional parameter. A combination of one or more [`RuntimeClassType`](runtimeclasstype-enumeration.md) enumeration values. The `__WRL_CONFIGURATION_LEGACY__` macro can be defined to change the default value of *`classFlags`* for all runtime classes in the project. If defined, `RuntimeClass` instances are non-agile by default. When not defined, `RuntimeClass` instances are agile by default. To avoid ambiguity, always specify the `Microsoft::WRL::FtmBase` in `TInterfaces` or `RuntimeClassType::InhibitFtmBase`. If `InhibitFtmBase` and `FtmBase` are both used, the object will be agile.
2727
28-
*TInterfaces*<br/>
29-
The list of interfaces the object implements beyond `IUnknown`, `IInspectable` or other interfaces controlled by [RuntimeClassType](runtimeclasstype-enumeration.md). It also may list other classes to be derived from, notably `Microsoft::WRL::FtmBase` to make the object agile and cause it to implement `IMarshal`.
28+
*`TInterfaces`*\
29+
The list of interfaces the object implements beyond `IUnknown`, `IInspectable` or other interfaces controlled by [`RuntimeClassType`](runtimeclasstype-enumeration.md). It also may list other classes to be derived from, notably `Microsoft::WRL::FtmBase` to make the object agile and cause it to implement `IMarshal`.
3030
3131
## Members
3232
33-
`RuntimeClassInitialize`<br/>
34-
A function which initializes the object if the `MakeAndInitialize` function template is used to construct the object. It returns S_OK if the object was successfully initialized, or a COM error code if initialization failed. The COM error code is propagated as the return value of `MakeAndInitialize`. Note that the `RuntimeClassInitialize` method is not called if the `Make` function template is used to construct the object.
33+
`RuntimeClassInitialize`\
34+
A function that initializes the object if the `MakeAndInitialize` function template is used to construct the object. It returns `S_OK` if the object was successfully initialized, or a COM error code if initialization failed. The COM error code is propagated as the return value of `MakeAndInitialize`. The `RuntimeClassInitialize` method isn't called if the `Make` function template is used to construct the object.
3535
3636
### Public Constructors
3737
38-
| Name | Description |
39-
| -------------------------------------------------- | --------------------------------------------------------------- |
40-
| [RuntimeClass::RuntimeClass](#runtimeclass) | Initializes the current instance of the `RuntimeClass` class. |
41-
| [RuntimeClass::~RuntimeClass](#tilde-runtimeclass) | Deinitializes the current instance of the `RuntimeClass` class. |
38+
| Name | Description |
39+
|--|--|
40+
| [`RuntimeClass::RuntimeClass`](#runtimeclass) | Initializes the current instance of the `RuntimeClass` class. |
41+
| [`RuntimeClass::~RuntimeClass`](#tilde-runtimeclass) | Deinitializes the current instance of the `RuntimeClass` class. |
4242
4343
### Public Methods
4444
45-
| Name | Description |
46-
| --------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
47-
| [RuntimeClass::AddRef](#addref) | Increments the reference count for the current `RuntimeClass` object. |
48-
| [RuntimeClass::DecrementReference](#decrementreference) | Decrements the reference count for the current `RuntimeClass` object. |
49-
| [RuntimeClass::GetIids](#getiids) | Gets an array that can contain the interface IDs implemented by the current `RuntimeClass` object. |
50-
| [RuntimeClass::GetRuntimeClassName](#getruntimeclassname) | Gets the runtime class name of the current `RuntimeClass` object. |
51-
| [RuntimeClass::GetTrustLevel](#gettrustlevel) | Gets the trust level of the current `RuntimeClass` object. |
52-
| [RuntimeClass::GetWeakReference](#getweakreference) | Gets a pointer to the weak reference object for the current `RuntimeClass` object. |
53-
| [RuntimeClass::InternalAddRef](#internaladdref) | Increments the reference count to the current `RuntimeClass` object. |
54-
| [RuntimeClass::QueryInterface](#queryinterface) | Retrieves a pointer to the specified interface ID. |
55-
| [RuntimeClass::Release](#release) | Performs a COM Release operation on the current `RuntimeClass` object. |
45+
| Name | Description |
46+
|--|--|
47+
| [`RuntimeClass::AddRef`](#addref) | Increments the reference count for the current `RuntimeClass` object. |
48+
| [`RuntimeClass::DecrementReference`](#decrementreference) | Decrements the reference count for the current `RuntimeClass` object. |
49+
| [`RuntimeClass::GetIids`](#getiids) | Gets an array that can contain the interface IDs implemented by the current `RuntimeClass` object. |
50+
| [`RuntimeClass::GetRuntimeClassName`](#getruntimeclassname) | Gets the runtime class name of the current `RuntimeClass` object. |
51+
| [`RuntimeClass::GetTrustLevel`](#gettrustlevel) | Gets the trust level of the current `RuntimeClass` object. |
52+
| [`RuntimeClass::GetWeakReference`](#getweakreference) | Gets a pointer to the weak reference object for the current `RuntimeClass` object. |
53+
| [`RuntimeClass::InternalAddRef`](#internaladdref) | Increments the reference count to the current `RuntimeClass` object. |
54+
| [`RuntimeClass::QueryInterface`](#queryinterface) | Retrieves a pointer to the specified interface ID. |
55+
| [`RuntimeClass::Release`](#release) | Performs a COM Release operation on the current `RuntimeClass` object. |
5656
5757
## Inheritance Hierarchy
5858
59-
This is an implementation detail.
59+
The hierarchy is an implementation detail.
6060
6161
## Requirements
6262
6363
**Header:** implements.h
6464
65-
**Namespace:** Microsoft::WRL
65+
**Namespace:** `Microsoft::WRL`
6666
67-
## <a name="tilde-runtimeclass"></a> RuntimeClass::~RuntimeClass
67+
## <a name="tilde-runtimeclass"></a> `RuntimeClass::~RuntimeClass`
6868
6969
Deinitializes the current instance of the `RuntimeClass` class.
7070
7171
```cpp
7272
virtual ~RuntimeClass();
7373
```
7474

75-
## <a name="addref"></a> RuntimeClass::AddRef
75+
## <a name="addref"></a> `RuntimeClass::AddRef`
7676

7777
Increments the reference count for the current `RuntimeClass` object.
7878

@@ -83,23 +83,23 @@ STDMETHOD_(
8383
)();
8484
```
8585

86-
### Return Value
86+
### Return value
8787

88-
S_OK if successful; otherwise, an HRESULT that indicates the error.
88+
`S_OK` if successful; otherwise, an `HRESULT` that indicates the error.
8989

90-
## <a name="decrementreference"></a> RuntimeClass::DecrementReference
90+
## <a name="decrementreference"></a> `RuntimeClass::DecrementReference`
9191

9292
Decrements the reference count for the current `RuntimeClass` object.
9393

9494
```cpp
9595
ULONG DecrementReference();
9696
```
9797

98-
### Return Value
98+
### Return value
9999

100-
S_OK if successful; otherwise, an HRESULT that indicates the error.
100+
`S_OK` if successful; otherwise, an `HRESULT` that indicates the error.
101101

102-
## <a name="getiids"></a> RuntimeClass::GetIids
102+
## <a name="getiids"></a> `RuntimeClass::GetIids`
103103

104104
Gets an array that can contain the interface IDs implemented by the current `RuntimeClass` object.
105105

@@ -113,17 +113,17 @@ STDMETHOD(
113113
114114
### Parameters
115115
116-
*iidCount*<br/>
117-
When this operation completes, the total number of elements in array *iids*.
116+
*`iidCount`*\
117+
When this operation completes, the total number of elements in array *`iids`*.
118118
119-
*iids*<br/>
119+
*`iids`*\
120120
When this operation completes, a pointer to an array of interface IDs.
121121
122-
### Return Value
122+
### Return value
123123
124-
S_OK if successful; otherwise, E_OUTOFMEMORY.
124+
`S_OK` if successful; otherwise, `E_OUTOFMEMORY`.
125125
126-
## <a name="getruntimeclassname"></a> RuntimeClass::GetRuntimeClassName
126+
## <a name="getruntimeclassname"></a> `RuntimeClass::GetRuntimeClassName`
127127
128128
Gets the runtime class name of the current `RuntimeClass` object.
129129
@@ -135,18 +135,18 @@ STDMETHOD( GetRuntimeClassName )(
135135

136136
### Parameters
137137

138-
*runtimeName*<br/>
138+
*`runtimeName`*\
139139
When this operation completes, the runtime class name.
140140

141-
### Return Value
141+
### Return value
142142

143-
S_OK if successful; otherwise, an HRESULT that indicates the error.
143+
`S_OK` if successful; otherwise, an `HRESULT` that indicates the error.
144144

145145
### Remarks
146146

147147
An assert error is emitted if `__WRL_STRICT__` or `__WRL_FORCE_INSPECTABLE_CLASS_MACRO__` isn't defined.
148148

149-
## <a name="gettrustlevel"></a> RuntimeClass::GetTrustLevel
149+
## <a name="gettrustlevel"></a> `RuntimeClass::GetTrustLevel`
150150

151151
Gets the trust level of the current `RuntimeClass` object.
152152

@@ -158,18 +158,18 @@ STDMETHOD(GetTrustLevel)(
158158

159159
### Parameters
160160

161-
*trustLvl*<br/>
161+
*`trustLvl`*\
162162
When this operation completes, the trust level of the current `RuntimeClass` object.
163163

164-
### Return Value
164+
### Return value
165165

166-
Always S_OK.
166+
Always `S_OK`.
167167

168168
### Remarks
169169

170170
An assert error is emitted if `__WRL_STRICT__` or `__WRL_FORCE_INSPECTABLE_CLASS_MACRO__` isn't defined.
171171

172-
## <a name="getweakreference"></a> RuntimeClass::GetWeakReference
172+
## <a name="getweakreference"></a> `RuntimeClass::GetWeakReference`
173173

174174
Gets a pointer to the weak reference object for the current `RuntimeClass` object.
175175

@@ -181,26 +181,26 @@ STDMETHOD(
181181
182182
### Parameters
183183
184-
*weakReference*<br/>
184+
*`weakReference`*\
185185
When this operation completes, a pointer to a weak reference object.
186186
187-
### Return Value
187+
### Return value
188188
189-
Always S_OK.
189+
Always `S_OK`.
190190
191-
## <a name="internaladdref"></a> RuntimeClass::InternalAddRef
191+
## <a name="internaladdref"></a> `RuntimeClass::InternalAddRef`
192192
193193
Increments the reference count to the current `RuntimeClass` object.
194194
195195
```cpp
196196
ULONG InternalAddRef();
197197
```
198198

199-
### Return Value
199+
### Return value
200200

201201
The resulting reference count.
202202

203-
## <a name="queryinterface"></a> RuntimeClass::QueryInterface
203+
## <a name="queryinterface"></a> `RuntimeClass::QueryInterface`
204204

205205
Retrieves a pointer to the specified interface ID.
206206

@@ -214,17 +214,17 @@ STDMETHOD(
214214
215215
### Parameters
216216
217-
*riid*<br/>
217+
*`riid`*\
218218
An interface ID.
219219
220-
*ppvObject*<br/>
221-
When this opereation completes, a pointer to the interface specified by the *riid* parameter.
220+
*`ppvObject`*\
221+
When this operation completes, a pointer to the interface specified by the *`riid`* parameter.
222222
223-
### Return Value
223+
### Return value
224224
225-
S_OK if successful; otherwise, an HRESULT that indicates the error.
225+
`S_OK` if successful; otherwise, an `HRESULT` that indicates the error.
226226
227-
## <a name="release"></a> RuntimeClass::Release
227+
## <a name="release"></a> `RuntimeClass::Release`
228228
229229
Performs a COM Release operation on the current `RuntimeClass` object.
230230
@@ -235,15 +235,15 @@ STDMETHOD_(
235235
)();
236236
```
237237

238-
### Return Value
238+
### Return value
239239

240-
S_OK if successful; otherwise, an HRESULT that indicates the error.
240+
`S_OK` if successful; otherwise, an `HRESULT` that indicates the error.
241241

242242
### Remarks
243243

244244
If the reference count becomes zero, the `RuntimeClass` object is deleted.
245245

246-
## <a name="runtimeclass"></a> RuntimeClass::RuntimeClass
246+
## <a name="runtimeclass"></a> `RuntimeClass::RuntimeClass`
247247

248248
Initializes the current instance of the `RuntimeClass` class.
249249

0 commit comments

Comments
 (0)