Skip to content

Commit 5245f33

Browse files
authored
Merge pull request MicrosoftDocs#1352 from DennisLee-DennisLee/v-dele-1338191-DeferrableEventArgs
1338191: Consolidated the ClassFactory and DeferrableEventArgs class topics.
2 parents 68bcd22 + da0df23 commit 5245f33

11 files changed

+162
-317
lines changed

.openpublishing.redirection.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6235,6 +6235,41 @@
62356235
"redirect_url": "/cpp/windows/overview-of-windows-programming-in-cpp",
62366236
"redirect_document_id": false
62376237
},
6238+
{
6239+
"source_path": "docs/windows/classfactory-addref-method.md",
6240+
"redirect_url": "/cpp/windows/classfactory-class#addref",
6241+
"redirect_document_id": false
6242+
},
6243+
{
6244+
"source_path": "docs/windows/classfactory-classfactory-constructor.md",
6245+
"redirect_url": "/cpp/windows/classfactory-class#classfactory",
6246+
"redirect_document_id": false
6247+
},
6248+
{
6249+
"source_path": "docs/windows/classfactory-lockserver-method.md",
6250+
"redirect_url": "/cpp/windows/classfactory-class#lockserver",
6251+
"redirect_document_id": false
6252+
},
6253+
{
6254+
"source_path": "docs/windows/classfactory-queryinterface-method.md",
6255+
"redirect_url": "/cpp/windows/classfactory-class#queryinterface",
6256+
"redirect_document_id": false
6257+
},
6258+
{
6259+
"source_path": "docs/windows/classfactory-release-method.md",
6260+
"redirect_url": "/cpp/windows/classfactory-class#release",
6261+
"redirect_document_id": false
6262+
},
6263+
{
6264+
"source_path": "docs/windows/deferrableeventargs-getdeferral-method.md",
6265+
"redirect_url": "/cpp/windows/deferrableeventargs-class#getdeferral",
6266+
"redirect_document_id": false
6267+
},
6268+
{
6269+
"source_path": "docs/windows/deferrableeventargs-invokeallfinished-method.md",
6270+
"redirect_url": "/cpp/windows/deferrableeventargs-class#invokeallfinished",
6271+
"redirect_document_id": false
6272+
},
62386273
{
62396274
"source_path": "docs/windows/eventsource-add-method.md",
62406275
"redirect_url": "/cpp/windows/eventsource-class#add",

docs/windows/TOC.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,6 @@
339339
###### [ChainInterfaces::IidCount Constant](chaininterfaces-iidcount-constant.md)
340340
###### [ChainInterfaces::Verify Method](chaininterfaces-verify-method.md)
341341
##### [ClassFactory Class](classfactory-class.md)
342-
###### [ClassFactory::AddRef Method](classfactory-addref-method.md)
343-
###### [ClassFactory::ClassFactory Constructor](classfactory-classfactory-constructor.md)
344-
###### [ClassFactory::LockServer Method](classfactory-lockserver-method.md)
345-
###### [ClassFactory::QueryInterface Method](classfactory-queryinterface-method.md)
346-
###### [ClassFactory::Release Method](classfactory-release-method.md)
347342
##### [CloakedIid Structure](cloakediid-structure.md)
348343
##### [ComposableBase Class](composablebase-class.md)
349344
##### [ComPtr Class](comptr-class.md)
@@ -372,8 +367,6 @@
372367
##### [CreateActivationFactory Function](createactivationfactory-function.md)
373368
##### [CreateClassFactory Function](createclassfactory-function.md)
374369
##### [DeferrableEventArgs Class](deferrableeventargs-class.md)
375-
###### [DeferrableEventArgs::GetDeferral Method](deferrableeventargs-getdeferral-method.md)
376-
###### [DeferrableEventArgs::InvokeAllFinished Method](deferrableeventargs-invokeallfinished-method.md)
377370
##### [EventSource Class](eventsource-class.md)
378371
##### [FactoryCacheFlags Enumeration](factorycacheflags-enumeration.md)
379372
##### [FtmBase Class](ftmbase-class.md)

docs/windows/classfactory-addref-method.md

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

docs/windows/classfactory-class.md

Lines changed: 92 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
title: "ClassFactory Class | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "11/04/2016"
4+
ms.date: "09/13/2018"
55
ms.technology: ["cpp-windows"]
66
ms.topic: "reference"
7-
f1_keywords: ["module/Microsoft::WRL::ClassFactory"]
7+
f1_keywords: ["module/Microsoft::WRL::ClassFactory", "module/Microsoft::WRL::ClassFactory::AddRef", "module/Microsoft::WRL::ClassFactory::ClassFactory", "module/Microsoft::WRL::ClassFactory::LockServer", "module/Microsoft::WRL::ClassFactory::QueryInterface", "module/Microsoft::WRL::ClassFactory::Release"]
88
dev_langs: ["C++"]
9-
helpviewer_keywords: ["ClassFactory class"]
9+
helpviewer_keywords: ["Microsoft::WRL::ClassFactory class", "Microsoft::WRL::ClassFactory::AddRef method", "Microsoft::WRL::ClassFactory::ClassFactory, constructor", "Microsoft::WRL::ClassFactory::LockServer method", "Microsoft::WRL::ClassFactory::QueryInterface method", "Microsoft::WRL::ClassFactory::Release method"]
1010
ms.assetid: f13e6bce-722b-4f18-b7cf-3ffa6345c1db
1111
author: "mikeblome"
1212
ms.author: "mblome"
@@ -47,7 +47,7 @@ The second interface.
4747
4848
## Remarks
4949
50-
Utilize **ClassFactory** to provide a user-defined factory implementation.
50+
Utilize `ClassFactory` to provide a user-defined factory implementation.
5151
5252
The following programming pattern demonstrates how to use the [Implements](../windows/implements-structure.md) structure to specify more than three interfaces on a class factory.
5353
@@ -57,18 +57,18 @@ The following programming pattern demonstrates how to use the [Implements](../wi
5757
5858
### Public Constructors
5959
60-
|Name|Description|
61-
|----------|-----------------|
62-
|[ClassFactory::ClassFactory Constructor](../windows/classfactory-classfactory-constructor.md)||
60+
Name | Description
61+
------------------------------------------- | -----------
62+
[ClassFactory::ClassFactory](#classfactory) |
6363
6464
### Public Methods
6565
66-
|Name|Description|
67-
|----------|-----------------|
68-
|[ClassFactory::AddRef Method](../windows/classfactory-addref-method.md)|Increments the reference count for the current **ClassFactory** object.|
69-
|[ClassFactory::LockServer Method](../windows/classfactory-lockserver-method.md)|Increments or decrements the number of underlying objects that are tracked by the current **ClassFactory** object.|
70-
|[ClassFactory::QueryInterface Method](../windows/classfactory-queryinterface-method.md)|Retrieves a pointer to the interface specified by parameter.|
71-
|[ClassFactory::Release Method](../windows/classfactory-release-method.md)|Decrements the reference count for the current **ClassFactory** object.|
66+
Name | Description
67+
----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------
68+
[ClassFactory::AddRef](#addref) | Increments the reference count for the current `ClassFactory` object.
69+
[ClassFactory::LockServer](#lockserver) | Increments or decrements the number of underlying objects that are tracked by the current `ClassFactory` object.
70+
[ClassFactory::QueryInterface](#queryinterface) | Retrieves a pointer to the interface specified by parameter.
71+
[ClassFactory::Release](#release) | Decrements the reference count for the current `ClassFactory` object.
7272
7373
## Inheritance Hierarchy
7474
@@ -98,7 +98,83 @@ The following programming pattern demonstrates how to use the [Implements](../wi
9898
9999
**Namespace:** Microsoft::WRL
100100
101-
## See Also
101+
## <a name="addref"></a>ClassFactory::AddRef
102102
103-
[Microsoft::WRL Namespace](../windows/microsoft-wrl-namespace.md)
104-
[RuntimeClassType Enumeration](../windows/runtimeclasstype-enumeration.md)
103+
Increments the reference count for the current `ClassFactory` object.
104+
105+
```cpp
106+
STDMETHOD_(
107+
ULONG,
108+
AddRef
109+
)();
110+
```
111+
112+
### Return Value
113+
114+
S_OK if successful; otherwise, an HRESULT that describes the failure.
115+
116+
## <a name="classfactory"></a>ClassFactory::ClassFactory
117+
118+
```cpp
119+
WRL_NOTHROW ClassFactory();
120+
```
121+
122+
## <a name="lockserver"></a>ClassFactory::LockServer
123+
124+
Increments or decrements the number of underlying objects that are tracked by the current `ClassFactory` object.
125+
126+
```cpp
127+
STDMETHOD(
128+
LockServer
129+
)(BOOL fLock);
130+
```
131+
132+
### Parameters
133+
134+
*fLock*
135+
`true` to increment the number of tracked objects. `false` to decrement the number of tracked objects.
136+
137+
### Return Value
138+
139+
S_OK if successful; otherwise, E_FAIL.
140+
141+
### Remarks
142+
143+
`ClassFactory` keeps track of objects in an underlying instance of the [Module](../windows/module-class.md) class.
144+
145+
## <a name="queryinterface"></a>ClassFactory::QueryInterface
146+
147+
Retrieves a pointer to the interface specified by parameter.
148+
149+
```cpp
150+
STDMETHOD(
151+
QueryInterface
152+
)(REFIID riid, _Deref_out_ void **ppvObject);
153+
```
154+
155+
### Parameters
156+
157+
*riid*
158+
An interface ID.
159+
160+
*ppvObject*
161+
When this operation completes, a pointer to the interface specified by parameter *riid*.
162+
163+
### Return Value
164+
165+
S_OK if successful; otherwise, an HRESULT that describes the failure.
166+
167+
## <a name="release"></a>ClassFactory::Release
168+
169+
Decrements the reference count for the current `ClassFactory` object.
170+
171+
```cpp
172+
STDMETHOD_(
173+
ULONG,
174+
Release
175+
)();
176+
```
177+
178+
### Return Value
179+
180+
S_OK if successful; otherwise, an HRESULT that describes the failure.

docs/windows/classfactory-classfactory-constructor.md

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

docs/windows/classfactory-lockserver-method.md

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

docs/windows/classfactory-queryinterface-method.md

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

0 commit comments

Comments
 (0)