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/ccomsafearraybound-class.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ class CComSafeArrayBound : public SAFEARRAYBOUND
41
41
|[operator =](#operator_eq)|Sets the `CComSafeArrayBound` to a new value.|
42
42
43
43
## Remarks
44
-
This class is a wrapper for the **SAFEARRAYBOUND** structure used by [CComSafeArray](../../atl/reference/ccomsafearray-class.md). It provides methods for querying and setting the upper and lower bounds of a single dimension of a `CComSafeArray` object and the number of elements it contains. A multidimensional `CComSafeArray` object uses an array of `CComSafeArrayBound` objects, one for each dimension. Therefore, when using methods such as [GetCount](#getcount), be aware that this method will not return the total number of elements in a multidimensional array.
44
+
This class is a wrapper for the `SAFEARRAYBOUND` structure used by [CComSafeArray](../../atl/reference/ccomsafearray-class.md). It provides methods for querying and setting the upper and lower bounds of a single dimension of a `CComSafeArray` object and the number of elements it contains. A multidimensional `CComSafeArray` object uses an array of `CComSafeArrayBound` objects, one for each dimension. Therefore, when using methods such as [GetCount](#getcount), be aware that this method will not return the total number of elements in a multidimensional array.
Copy file name to clipboardExpand all lines: docs/atl/reference/ccomsafedeletecriticalsection-class.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ class CComSafeDeleteCriticalSection : public CComCriticalSection
42
42
43
43
|||
44
44
|-|-|
45
-
|[m_bInitialized](#m_binitialized)|Flags whether the internal **CRITICAL_SECTION** object has been initialized.|
45
+
|[m_bInitialized](#m_binitialized)|Flags whether the internal `CRITICAL_SECTION` object has been initialized.|
46
46
47
47
## Remarks
48
48
`CComSafeDeleteCriticalSection` derives from the class [CComCriticalSection](../../atl/reference/ccomcriticalsection-class.md). However, `CComSafeDeleteCriticalSection` provides additional safety mechanisms over [CComCriticalSection](../../atl/reference/ccomcriticalsection-class.md).
Calls the base class implementation of [Init](/visualstudio/debugger/init) and sets [m_bInitialized](#m_binitialized) to **true** if successful.
83
+
Calls the base class implementation of [Init](/visualstudio/debugger/init) and sets [m_bInitialized](#m_binitialized) to TRUE if successful.
84
84
85
85
```
86
86
HRESULT Init() throw();
@@ -101,32 +101,32 @@ HRESULT Lock();
101
101
Returns the result of [CComCriticalSection::Lock](../../atl/reference/ccomcriticalsection-class.md#lock).
102
102
103
103
### Remarks
104
-
This method assumes the [m_bInitialized](#m_binitialized) data member is set to **true** upon entry. An assertion is generated in Debug builds if this condidtion is not met.
104
+
This method assumes the [m_bInitialized](#m_binitialized) data member is set to TRUE upon entry. An assertion is generated in Debug builds if this condidtion is not met.
105
105
106
106
For more information on the behavior of the function, refer to [CComCriticalSection::Lock](../../atl/reference/ccomcriticalsection-class.md#lock).
Flags whether the internal **CRITICAL_SECTION** object has been initialized.
109
+
Flags whether the internal `CRITICAL_SECTION` object has been initialized.
110
110
111
111
```
112
112
bool m_bInitialized;
113
113
```
114
114
115
115
### Remarks
116
-
The **m_bInitialized** data member is used to track validity of the underlying **CRITICAL_SECTION** object associated with the [CComSafeDeleteCriticalSection](../../atl/reference/ccomsafedeletecriticalsection-class.md) class. The underlying **CRITICAL_SECTION** object will not be attempted to be released from memory if this flag is not set to **true**.
116
+
The `m_bInitialized` data member is used to track validity of the underlying `CRITICAL_SECTION` object associated with the [CComSafeDeleteCriticalSection](../../atl/reference/ccomsafedeletecriticalsection-class.md) class. The underlying `CRITICAL_SECTION` object will not be attempted to be released from memory if this flag is not set to TRUE.
Calls the base class implementation of [CComCriticalSection::Term](../../atl/reference/ccomcriticalsection-class.md#term) if the internal **CRITICAL_SECTION** object is valid.
119
+
Calls the base class implementation of [CComCriticalSection::Term](../../atl/reference/ccomcriticalsection-class.md#term) if the internal `CRITICAL_SECTION` object is valid.
120
120
121
121
```
122
122
HRESULT Term() throw();
123
123
```
124
124
125
125
### Return Value
126
-
Returns the result of [CComCriticalSection::Term](../../atl/reference/ccomcriticalsection-class.md#term), or **S_OK** if [m_bInitialized](#m_binitialized) was set to **false** upon entry.
126
+
Returns the result of [CComCriticalSection::Term](../../atl/reference/ccomcriticalsection-class.md#term), or S_OK if [m_bInitialized](#m_binitialized) was set to FALSE upon entry.
127
127
128
128
### Remarks
129
-
It is safe to call this method even if the internal **CRITICAL_SECTION** object is not valid. The destructor of this class calls this method if the [m_bInitialized](#m_binitialized) data member is set to **true**.
129
+
It is safe to call this method even if the internal `CRITICAL_SECTION` object is not valid. The destructor of this class calls this method if the [m_bInitialized](#m_binitialized) data member is set to TRUE.
Copy file name to clipboardExpand all lines: docs/atl/reference/ccomsinglethreadmodel-class.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ class CComSingleThreadModel
40
40
## Remarks
41
41
`CComSingleThreadModel` provides methods for incrementing and decrementing the value of a variable. Unlike [CComMultiThreadModel](../../atl/reference/ccommultithreadmodel-class.md) and [CComMultiThreadModelNoCS](../../atl/reference/ccommultithreadmodelnocs-class.md), these methods are not thread-safe.
42
42
43
-
Typically, you use `CComSingleThreadModel` through one of two `typedef` names, either [CComObjectThreadModel](atl-typedefs.md#ccomobjectthreadmodel) or [CComGlobalsThreadModel](atl-typedefs.md#ccomglobalsthreadmodel). The class referenced by each `typedef` depends on the threading model used, as shown in the following table:
43
+
Typically, you use `CComSingleThreadModel` through one of two **typedef** names, either [CComObjectThreadModel](atl-typedefs.md#ccomobjectthreadmodel) or [CComGlobalsThreadModel](atl-typedefs.md#ccomglobalsthreadmodel). The class referenced by each **typedef** depends on the threading model used, as shown in the following table:
`CComSingleThreadModel` itself defines three `typedef` names. `ThreadModelNoCS` references `CComSingleThreadModel`. `AutoCriticalSection` and `CriticalSection` reference class [CComFakeCriticalSection](../../atl/reference/ccomfakecriticalsection-class.md), which provides empty methods associated with obtaining and releasing ownership of a critical section.
53
+
`CComSingleThreadModel` itself defines three **typedef** names. `ThreadModelNoCS` references `CComSingleThreadModel`. `AutoCriticalSection` and `CriticalSection` reference class [CComFakeCriticalSection](../../atl/reference/ccomfakecriticalsection-class.md), which provides empty methods associated with obtaining and releasing ownership of a critical section.
When using `CComSingleThreadModel`, the `typedef` name `AutoCriticalSection` references class [CComFakeCriticalSection](../../atl/reference/ccomfakecriticalsection-class.md).
59
+
When using `CComSingleThreadModel`, the **typedef** name `AutoCriticalSection` references class [CComFakeCriticalSection](../../atl/reference/ccomfakecriticalsection-class.md).
In addition to `AutoCriticalSection`, you can use the `typedef` name [CriticalSection](#criticalsection). You should not specify `AutoCriticalSection` in global objects or static class members if you want to eliminate the CRT startup code.
76
+
In addition to `AutoCriticalSection`, you can use the **typedef** name [CriticalSection](#criticalsection). You should not specify `AutoCriticalSection` in global objects or static class members if you want to eliminate the CRT startup code.
77
77
78
78
### Example
79
79
See [CComMultiThreadModel::AutoCriticalSection](../../atl/reference/ccommultithreadmodel-class.md#autocriticalsection).
When using `CComSingleThreadModel`, the `typedef` name `CriticalSection` references class [CComFakeCriticalSection](../../atl/reference/ccomfakecriticalsection-class.md).
82
+
When using `CComSingleThreadModel`, the **typedef** name `CriticalSection` references class [CComFakeCriticalSection](../../atl/reference/ccomfakecriticalsection-class.md).
In addition to `CriticalSection`, you can use the `typedef` name [AutoCriticalSection](#autocriticalsection). You should not specify `AutoCriticalSection` in global objects or static class members if you want to eliminate the CRT startup code.
99
+
In addition to `CriticalSection`, you can use the **typedef** name [AutoCriticalSection](#autocriticalsection). You should not specify `AutoCriticalSection` in global objects or static class members if you want to eliminate the CRT startup code.
100
100
101
101
### Example
102
102
See [CComMultiThreadModel::AutoCriticalSection](../../atl/reference/ccommultithreadmodel-class.md#autocriticalsection).
Copy file name to clipboardExpand all lines: docs/atl/reference/ccomtearoffobject-class.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ class CComTearOffObject : public Base
23
23
```
24
24
25
25
#### Parameters
26
-
`Base`
26
+
*Base*
27
27
Your tear-off class, derived from `CComTearOffObjectBase` and the interfaces you want your tear-off object to support.
28
28
29
29
ATL implements its tear-off interfaces in two phases — the `CComTearOffObjectBase` methods handle the reference count and `QueryInterface`, while `CComTearOffObject` implements [IUnknown](http://msdn.microsoft.com/library/windows/desktop/ms680509).
@@ -62,7 +62,7 @@ class CComTearOffObject : public Base
62
62
63
63
You should derive the class implementing the tear-off from `CComTearOffObjectBase` and from whichever interfaces you want your tear-off object to support. `CComTearOffObjectBase` is templatized on the owner class and the thread model. The owner class is the class of the object for which a tear-off is being implemented. If you do not specify a thread model, the default thread model is used.
64
64
65
-
You should create a COM map for your tear-off class. When ATL instantiates the tear-off, it will create **CComTearOffObject\<CYourTearOffClass>** or **CComCachedTearOffObject\<CYourTearOffClass>**.
65
+
You should create a COM map for your tear-off class. When ATL instantiates the tear-off, it will create `CComTearOffObject<CYourTearOffClass>` or `CComCachedTearOffObject<CYourTearOffClass>`.
66
66
67
67
For example, in the BEEPER sample, the `CBeeper2` class is the tear-off class and the `CBeeper` class is the owner class:
68
68
@@ -94,8 +94,8 @@ CComTearOffObject(void* pv);
94
94
```
95
95
96
96
### Parameters
97
-
`pv`
98
-
[in] Pointer that will be converted to a pointer to a **CComObject\<Owner>** object.
97
+
*pv*
98
+
[in] Pointer that will be converted to a pointer to a `CComObject<Owner>` object.
99
99
100
100
### Remarks
101
101
Increments the owner's reference count by one.
@@ -118,7 +118,7 @@ CComTearOffObjectBase();
118
118
```
119
119
120
120
### Remarks
121
-
Initializes the [m_pOwner](#m_powner) member to **NULL**.
121
+
Initializes the [m_pOwner](#m_powner) member to NULL.
[out] A pointer to the interface pointer identified by `iid`, or **NULL** if the interface is not found.
148
+
*ppvObject*
149
+
[out] A pointer to the interface pointer identified by *iid*, or NULL if the interface is not found.
150
150
151
151
### Return Value
152
-
A standard `HRESULT` value.
152
+
A standard HRESULT value.
153
153
154
154
### Remarks
155
-
Queries first for interfaces on your tear-off class. If the interface is not there, queries for the interface on the owner object. If the requested interface is **IUnknown**, returns the **IUnknown** of the owner.
155
+
Queries first for interfaces on your tear-off class. If the interface is not there, queries for the interface on the owner object. If the requested interface is `IUnknown`, returns the `IUnknown` of the owner.
0 commit comments