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/ccomdynamicunkarray-class.md
+19-8Lines changed: 19 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ class CComDynamicUnkArray
35
35
|[CComDynamicUnkArray::end](#end)|Returns a pointer to one past the last `IUnknown` pointer in the collection.|
36
36
|[CComDynamicUnkArray::GetAt](#getat)|Retrieves the element at the specified index.|
37
37
|[CComDynamicUnkArray::GetCookie](#getcookie)|Call this method to get the cookie associated with a given `IUnknown` pointer.|
38
-
|[CComDynamicUnkArray::GetSize](#getsize)|Returns the length of an array.|
38
+
|[CComDynamicUnkArray::GetSize](#getsize)|Returns the number of elements the array can store.|
39
39
|[CComDynamicUnkArray::GetUnknown](#getunknown)|Call this method to get the `IUnknown` pointer associated with a given cookie.|
40
40
|[CComDynamicUnkArray::Remove](#remove)|Call this method to remove an `IUnknown` pointer from the array.|
41
41
@@ -69,7 +69,12 @@ The `IUnknown` pointer to add to the array.
69
69
70
70
### Return Value
71
71
72
-
Returns the cookie associated with the newly added pointer.
72
+
Returns the cookie associated with the newly added pointer. Use this cookie to retrieve the pointer from the array with [CComDynamicUnkArray::GetAt](#getat).
73
+
74
+
### Remarks
75
+
76
+
The position where this item is inserted won't necessarily be directly after the last-inserted item if `Remove()` was previously called on this array. Use the returned cookie to reliably access the inserted pointer.
77
+
The array's size might be increased to accommodate more items. Use `GetSize()` to get the new size.
73
78
74
79
## <aname="begin"></a> CComDynamicUnkArray::begin
75
80
@@ -92,7 +97,7 @@ Before using the `IUnknown` interface, you should check that it is not NULL.
92
97
93
98
## <aname="clear"></a> CComDynamicUnkArray::clear
94
99
95
-
Empties the array.
100
+
Empties the array. Resets the size to 0.
96
101
97
102
```cpp
98
103
voidclear();
@@ -124,7 +129,9 @@ Frees resources allocated by the class constructor.
124
129
125
130
## <aname="end"></a> CComDynamicUnkArray::end
126
131
127
-
Returns a pointer to one past the last `IUnknown` pointer in the collection.
132
+
Returns a pointer to one-past the last element in the array's allocated buffer.
133
+
134
+
Note: this means that the last-inserted pointer is not guaranteed to be at `end()-1` because the array may not be filled to capacity.
128
135
129
136
```
130
137
IUnknown**
@@ -150,7 +157,7 @@ The index of the element to retrieve.
150
157
151
158
### Return Value
152
159
153
-
A pointer to an [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface.
160
+
A pointer to an [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface if an element was previously added and exists at this index; otherwise `NULL`.
1. In **Additional Options**, enter *`/INTEGRITYCHECK`* or *`/INTEGRITYCHECK:NO`*. Choose **OK** to save your changes.
28
+
1. To build an image which requires digital signature verification to be loaded, add *`/INTEGRITYCHECK`* to the **Additional Options** command line. By default, **`/INTEGRITYCHECK`** is off.
0 commit comments