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/atl/reference/ccomclassfactorysingleton-class.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
@@ -25,7 +25,7 @@ class CComClassFactorySingleton : public CComClassFactory
25
25
```
26
26
27
27
#### Parameters
28
-
`T`
28
+
*T*
29
29
Your class.
30
30
31
31
`CComClassFactorySingleton` derives from [CComClassFactory](../../atl/reference/ccomclassfactory-class.md) and uses [CComObjectGlobal](../../atl/reference/ccomobjectglobal-class.md) to construct a single object. Each call to the `CreateInstance` method simply queries this object for an interface pointer.
The COM interface that should be returned via `pp`.
71
+
*Q*
72
+
The COM interface that should be returned via *pp*.
73
73
74
74
*punkOuter*
75
75
[in] The outer unknown or controlling unknown of the aggregate.
76
76
77
-
`pp`
77
+
*pp*
78
78
[out] The address of a pointer variable that receives the requested interface pointer if creation succeeds.
79
79
80
80
### Return Value
81
-
A standard `HRESULT` value. See [CoCreateInstance](http://msdn.microsoft.com/library/windows/desktop/ms686615) in the Windows SDK for a description of possible return values.
81
+
A standard HRESULT value. See [CoCreateInstance](http://msdn.microsoft.com/library/windows/desktop/ms686615) in the Windows SDK for a description of possible return values.
82
82
83
83
### Remarks
84
84
Use the first overload of this function for typical object creation; use the second overload when you need to aggregate the object being created.
These functions are useful for creating objects that you have prevented from being externally creatable by using the [OBJECT_ENTRY_NON_CREATEABLE_EX_AUTO](object-map-macros.md#object_entry_non_createable_ex_auto) macro. They are also useful in situations where you want to avoid the COM API for reasons of efficiency.
89
89
90
-
Note that the interface `Q` must have an IID associated with it that can be retrieved using the [__uuidof](../../cpp/uuidof-operator.md) operator.
90
+
Note that the interface *Q* must have an IID associated with it that can be retrieved using the [__uuidof](../../cpp/uuidof-operator.md) operator.
91
91
92
92
### Example
93
-
In the following example, `CDocument` is a wizard-generated ATL class derived from `CComCoClass` that implements the **IDocument** interface. The class is registered in the object map with the `OBJECT_ENTRY_NON_CREATEABLE_EX_AUTO` macro so clients can't create instances of the document using [CoCreateInstance](http://msdn.microsoft.com/library/windows/desktop/ms686615). `CApplication` is a CoClass that provides a method on one of its own COM interfaces to create instances of the document class. The code below shows how easy it to create instances of the document class using the `CreateInstance` member inherited from the `CComCoClass` base class.
93
+
In the following example, `CDocument` is a wizard-generated ATL class derived from `CComCoClass` that implements the `IDocument` interface. The class is registered in the object map with the OBJECT_ENTRY_NON_CREATEABLE_EX_AUTO macro so clients can't create instances of the document using [CoCreateInstance](http://msdn.microsoft.com/library/windows/desktop/ms686615). `CApplication` is a CoClass that provides a method on one of its own COM interfaces to create instances of the document class. The code below shows how easy it to create instances of the document class using the `CreateInstance` member inherited from the `CComCoClass` base class.
[in] The string describing the error. The Unicode version of `Error` specifies that `lpszDesc` is of type **LPCOLESTR**; the ANSI version specifies a type of `LPCSTR`.
141
+
*lpszDesc*
142
+
[in] The string describing the error. The Unicode version of `Error` specifies that *lpszDesc* is of type LPCOLESTR; the ANSI version specifies a type of LPCSTR.
143
+
*iid*
144
+
[in] The IID of the interface defining the error or GUID_NULL (the default value) if the error is defined by the operating system.
143
145
144
-
`iid`
145
-
[in] The IID of the interface defining the error or `GUID_NULL` (the default value) if the error is defined by the operating system.
146
+
*hRes*
147
+
[in] The HRESULT you want returned to the caller. The default value is 0. For more details about *hRes*, see Remarks.
146
148
147
-
`hRes`
148
-
[in] The `HRESULT` you want returned to the caller. The default value is 0. For more details about `hRes`, see Remarks.
149
+
*nID*
150
+
[in] The resource identifier where the error description string is stored. This value should lie between 0x0200 and 0xFFFF, inclusively. In debug builds, an **ASSERT** will result if *nID* does not index a valid string. In release builds, the error description string will be set to "Unknown Error."
149
151
150
-
`nID`
151
-
[in] The resource identifier where the error description string is stored. This value should lie between 0x0200 and 0xFFFF, inclusively. In debug builds, an **ASSERT** will result if `nID` does not index a valid string. In release builds, the error description string will be set to "Unknown Error."
152
-
153
-
`dwHelpID`
152
+
*dwHelpID*
154
153
[in] The help context identifier for the error.
155
154
156
-
`lpszHelpFile`
155
+
*lpszHelpFile*
157
156
[in] The path and name of the help file describing the error.
158
157
159
-
`hInst`
160
-
[in] The handle to the resource. By default, this parameter is **_AtlModule::GetResourceInstance**, where **_AtlModule** is the global instance of [CAtlModule](../../atl/reference/catlmodule-class.md).
158
+
*hInst*
159
+
[in] The handle to the resource. By default, this parameter is `_AtlModule::GetResourceInstance`, where `_AtlModule` is the global instance of [CAtlModule](../../atl/reference/catlmodule-class.md).
161
160
162
161
### Return Value
163
-
A standard `HRESULT` value. For details, see Remarks.
162
+
A standard HRESULT value. For details, see Remarks.
164
163
165
164
### Remarks
166
165
To call `Error`, your object must implement the `ISupportErrorInfo Interface` interface.
167
166
168
-
If the `hRes` parameter is nonzero, then `Error` returns the value of `hRes`. If `hRes` is zero, then the first four versions of `Error` return `DISP_E_EXCEPTION`. The last two versions return the result of the macro **MAKE_HRESULT( 1, FACILITY_ITF,**`nID`**)**.
167
+
If the *hRes* parameter is nonzero, then `Error` returns the value of *hRes*. If *hRes* is zero, then the first four versions of `Error` return DISP_E_EXCEPTION. The last two versions return the result of the macro **MAKE_HRESULT( 1, FACILITY_ITF,***nID***)**.
The default implementation returns **NULL**. You can override this method with the [DECLARE_OBJECT_DESCRIPTION](object-map-macros.md#declare_object_description) macro. For example:
190
+
The default implementation returns NULL. You can override this method with the [DECLARE_OBJECT_DESCRIPTION](object-map-macros.md#declare_object_description) macro. For example:
`GetObjectDescription` is called by **IComponentRegistrar::GetComponents**. **IComponentRegistrar** is an Automation interface that allows you to register and unregister individual components in a DLL. When you create a Component Registrar object with the ATL Project Wizard, the wizard will automatically implement the **IComponentRegistrar** interface. **IComponentRegistrar** is typically used by Microsoft Transaction Server.
194
+
`GetObjectDescription` is called by `IComponentRegistrar::GetComponents`. `IComponentRegistrar` is an Automation interface that allows you to register and unregister individual components in a DLL. When you create a Component Registrar object with the ATL Project Wizard, the wizard will automatically implement the `IComponentRegistrar` interface. `IComponentRegistrar` is typically used by Microsoft Transaction Server.
196
195
197
196
For more information about the ATL Project Wizard, see the article [Creating an ATL Project](../../atl/reference/creating-an-atl-project.md).
Copy file name to clipboardExpand all lines: docs/atl/reference/ccomcompositecontrol-class.md
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ class CComCompositeControl : public CComControl<T,CAxDialogImpl<T>>
26
26
```
27
27
28
28
#### Parameters
29
-
`T`
29
+
*T*
30
30
Your class, derived from [CComObjectRoot](../../atl/reference/ccomobjectroot-class.md) or [CComObjectRootEx](../../atl/reference/ccomobjectrootex-class.md), as well as from any other interfaces you want to support for your composite control.
31
31
32
32
## Members
@@ -43,7 +43,7 @@ class CComCompositeControl : public CComControl<T,CAxDialogImpl<T>>
43
43
|Name|Description|
44
44
|----------|-----------------|
45
45
|[CComCompositeControl::AdviseSinkMap](#advisesinkmap)|Call this method to advise or unadvise all controls hosted by the composite control.|
46
-
|[CComCompositeControl::CalcExtent](#calcextent)|Call this method to calculate the size in **HIMETRIC** units of the dialog resource used to host the composite control.|
46
+
|[CComCompositeControl::CalcExtent](#calcextent)|Call this method to calculate the size in HIMETRIC units of the dialog resource used to host the composite control.|
47
47
|[CComCompositeControl::Create](#create)|This method is called to create the control window for the composite control.|
48
48
|[CComCompositeControl::CreateControlWindow](#createcontrolwindow)|Call this method to create the control window and advise any hosted control.|
49
49
|[CComCompositeControl::SetBackgroundColorFromAmbient](#setbackgroundcolorfromambient)|Call this method to set the background color of the composite control using the container's background color.|
True if all controls are to be advised; otherwise false.
98
98
99
99
### Return Value
100
-
`S_OK`
100
+
S_OK
101
101
All controls in the event sink map were connected or disconnected from their event source successfully.
102
102
103
-
**E_FAIL**
103
+
E_FAIL
104
104
Not all controls in the event sink map could be connected or disconnected from their event source successfully.
105
105
106
-
`E_POINTER`
106
+
E_POINTER
107
107
This error usually indicates a problem with an entry in the control's event sink map or a problem with a template argument used in an `IDispEventImpl` or `IDispEventSimpleImpl` base class.
108
108
109
-
**CONNECT_E_ADVISELIMIT**
109
+
CONNECT_E_ADVISELIMIT
110
110
The connection point has already reached its limit of connections and cannot accept any more.
111
111
112
-
**CONNECT_E_CANNOTCONNECT**
112
+
CONNECT_E_CANNOTCONNECT
113
113
The sink does not support the interface required by this connection point.
114
114
115
-
**CONNECT_E_NOCONNECTION**
115
+
CONNECT_E_NOCONNECTION
116
116
The cookie value does not represent a valid connection. This error usually indicates a problem with an entry in the control's event sink map or a problem with a template argument used in an `IDispEventImpl` or `IDispEventSimpleImpl` base class.
117
117
118
118
### Remarks
119
119
The base implementation of this method searches through the entries in the event sink map. It then advises or unadvises the connection points to the COM objects described by the event sink map's sink entries. This member method also relies on the fact that the derived class inherits from one instance of `IDispEventImpl` for every control in the sink map that is to be advised or unadvised.
This method is called to create the control window for the composite control.
@@ -146,14 +146,14 @@ HWND Create(
146
146
```
147
147
148
148
### Parameters
149
-
`hWndParent`
149
+
*hWndParent*
150
150
A handle to the parent window of the control.
151
151
152
-
`rcPos`
152
+
*rcPos*
153
153
Reserved.
154
154
155
-
`dwInitParam`
156
-
Data to be passed to the control during control creation. The data passed as `dwInitParam` will show up as the **LPARAM** parameter of the [WM_INITDIALOG](http://msdn.microsoft.com/library/windows/desktop/ms645428) message, which will be sent to the composite control when it gets created.
155
+
*dwInitParam*
156
+
Data to be passed to the control during control creation. The data passed as *dwInitParam* will show up as the LPARAM parameter of the [WM_INITDIALOG](http://msdn.microsoft.com/library/windows/desktop/ms645428) message, which will be sent to the composite control when it gets created.
157
157
158
158
### Return Value
159
159
A handle to the newly created composite control dialog box.
Copy file name to clipboardExpand all lines: docs/atl/reference/ccomcontainedobject-class.md
+15-15Lines changed: 15 additions & 15 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"]
14
14
---
15
15
# CComContainedObject Class
16
-
This class implements [IUnknown](http://msdn.microsoft.com/library/windows/desktop/ms680509) by delegating to the owner object's **IUnknown**.
16
+
This class implements [IUnknown](http://msdn.microsoft.com/library/windows/desktop/ms680509) by delegating to the owner object's `IUnknown`.
17
17
18
18
> [!IMPORTANT]
19
19
> This class and its members cannot be used in applications that execute in the Windows Runtime.
@@ -26,7 +26,7 @@ class CComContainedObject : public Base
26
26
```
27
27
28
28
#### Parameters
29
-
`Base`
29
+
*Base*
30
30
Your class, derived from [CComObjectRoot](../../atl/reference/ccomobjectroot-class.md) or [CComObjectRootEx](../../atl/reference/ccomobjectrootex-class.md).
31
31
32
32
## Members
@@ -48,7 +48,7 @@ class CComContainedObject : public Base
48
48
|[CComContainedObject::Release](#release)|Decrements the reference count on the owner object.|
49
49
50
50
## Remarks
51
-
ATL uses `CComContainedObject` in classes [CComAggObject](../../atl/reference/ccomaggobject-class.md), [CComPolyObject](../../atl/reference/ccompolyobject-class.md), and [CComCachedTearOffObject](../../atl/reference/ccomcachedtearoffobject-class.md). `CComContainedObject` implements [IUnknown](http://msdn.microsoft.com/library/windows/desktop/ms680509) by delegating to the owner object's **IUnknown**. (The owner is either the outer object of an aggregation, or the object for which a tear-off interface is being created.) `CComContainedObject` calls `CComObjectRootEx`'s `OuterQueryInterface`, `OuterAddRef`, and `OuterRelease`, all inherited through `Base`.
51
+
ATL uses `CComContainedObject` in classes [CComAggObject](../../atl/reference/ccomaggobject-class.md), [CComPolyObject](../../atl/reference/ccompolyobject-class.md), and [CComCachedTearOffObject](../../atl/reference/ccomcachedtearoffobject-class.md). `CComContainedObject` implements [IUnknown](http://msdn.microsoft.com/library/windows/desktop/ms680509) by delegating to the owner object's `IUnknown`. (The owner is either the outer object of an aggregation, or the object for which a tear-off interface is being created.) `CComContainedObject` calls `CComObjectRootEx`'s `OuterQueryInterface`, `OuterAddRef`, and `OuterRelease`, all inherited through `Base`.
Returns the `m_pOuterUnknown` member pointer (inherited through the *Base* class) that holds the owner object's **IUnknown**.
96
+
Returns the `m_pOuterUnknown` member pointer (inherited through the *Base* class) that holds the owner object's `IUnknown`.
97
97
98
98
```
99
99
IUnknown* GetControllingUnknown();
100
100
```
101
101
102
102
### Return Value
103
-
The owner object's **IUnknown**.
103
+
The owner object's `IUnknown`.
104
104
105
105
### Remarks
106
106
This method may be virtual if `Base` has declared the [DECLARE_GET_CONTROLLING_UNKNOWN](aggregation-and-class-factory-macros.md#declare_get_controlling_unknown) macro.
0 commit comments