44 end = StringCollection->End();
45 for (
cur = StringCollection->Start();
51 *ContainsOnlyStrings =
FALSE;
58 if (ContainsOnlyStrings !=
NULL) {
59 *ContainsOnlyStrings =
TRUE;
62 if (StringCollection->Count() == 0) {
89 size_t cbSize, cbLength;
127#pragma prefast(disable:__WARNING_INCORRECT_ANNOTATION_STRING )
139 end = StringCollection->End();
161 if (StringCollection->Count() == 0) {
216 USHORT srcCbLength, srcCbLengthAndNull, dstMaxCbLength;
221 srcCbLength =
Source->Length;
224 status = RtlUShortAdd(srcCbLength,
226 &srcCbLengthAndNull);
230 "Interger overflow occured when duplicating string %!STATUS!",
238 if (dstMaxCbLength < srcCbLengthAndNull) {
242 dstMaxCbLength = srcCbLengthAndNull;
254 FxDriverGlobals,
PagedPool, dstMaxCbLength);
260 "Failed to allocate memory when duplicating string %!STATUS!",
294 pDuplicate = (
PWSTR) FxPoolAllocate(
297 if (pDuplicate !=
NULL) {
FxCollectionEntry * Next(VOID)
__inline USHORT ByteLength(__in BOOLEAN IncludeNull)
__inline PWCHAR Buffer(VOID)
#define NT_SUCCESS(StatCode)
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
void FxPoolFree(__in_xcount(ptr is at an offset from AllocationStart) PVOID ptr)
GLuint GLsizei GLsizei * length
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
#define _Must_inspect_result_
#define __nullnullterminated
#define TRACE_LEVEL_ERROR
PWSTR FxCopyMultiSz(__out LPWSTR Buffer, __in FxCollectionInternal *StringCollection)
size_t FxCalculateTotalMultiSzStringSize(__in __nullnullterminated PCWSTR MultiSz)
size_t FxCalculateTotalStringSize(__in FxCollectionInternal *StringCollection, __in BOOLEAN Verify, __out_opt PBOOLEAN ContainsOnlyStrings)
_Must_inspect_result_ PWCHAR FxDuplicateUnicodeStringToString(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in const UNICODE_STRING *Source)
_Must_inspect_result_ NTSTATUS FxDuplicateUnicodeString(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in const UNICODE_STRING *Source, __out PUNICODE_STRING Destination)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define STATUS_INSUFFICIENT_RESOURCES
#define WDF_PTR_ADD_OFFSET_TYPE(_ptr, _offset, _type)
#define WDF_PTR_ADD_OFFSET(_ptr, _offset)