27 USHORT BackTrackingBuffer[16], OldBackTrackingBuffer[16] = {0};
28 PUSHORT BackTrackingSwap, BackTracking = BackTrackingBuffer, OldBackTracking = OldBackTrackingBuffer;
32 USHORT ExpressionPosition, NamePosition = 0, MatchingChars = 1;
84 Name->Buffer + NamePosition,
90 for (ExpressionPosition = 0; ExpressionPosition < (IntExpression.
Length /
sizeof(
WCHAR)); ExpressionPosition++)
97 IntExpression.
Buffer[ExpressionPosition])
110 for (; !EndOfName; MatchingChars = BackTrackingPosition, NamePosition++)
113 OldBackTrackingPosition = BackTrackingPosition = 0;
115 if (NamePosition >=
Name->Length /
sizeof(
WCHAR))
118 if (MatchingChars && (OldBackTracking[MatchingChars - 1] ==
Expression->Length * 2))
122 while (MatchingChars > OldBackTrackingPosition)
124 ExpressionPosition = (OldBackTracking[OldBackTrackingPosition++] + 1) / 2;
129 ExpressionPosition +=
Offset;
133 BackTracking[BackTrackingPosition++] =
Expression->Length * 2;
138 if (BackTrackingPosition > BackTrackingBufferSize - 3)
142 ASSERT((BackTracking == BackTrackingBuffer) || (BackTracking == OldBackTrackingBuffer));
143 ASSERT((OldBackTracking == BackTrackingBuffer) || (OldBackTracking == OldBackTrackingBuffer));
150 2 * BackTrackingBufferSize *
sizeof(
USHORT),
152 if (AllocatedBuffer ==
NULL)
154 DPRINT1(
"Failed to allocate BackTracking buffer. BackTrackingBufferSize = =x%lx\n",
155 BackTrackingBufferSize);
166 BackTracking = AllocatedBuffer;
174 OldBackTracking = &BackTracking[BackTrackingBufferSize];
179 Name->Buffer[NamePosition]);
180 if (
Expression->Buffer[ExpressionPosition /
sizeof(
WCHAR)] == CompareChar && !EndOfName)
182 BackTracking[BackTrackingPosition++] = (ExpressionPosition +
sizeof(
WCHAR)) * 2;
185 else if (
Expression->Buffer[ExpressionPosition /
sizeof(
WCHAR)] ==
L'?' && !EndOfName)
187 BackTracking[BackTrackingPosition++] = (ExpressionPosition +
sizeof(
WCHAR)) * 2;
192 BackTracking[BackTrackingPosition++] = ExpressionPosition * 2;
193 BackTracking[BackTrackingPosition++] = (ExpressionPosition * 2) + 3;
201 if (!EndOfName &&
Name->Buffer[NamePosition] ==
'.')
213 if (EndOfName ||
Name->Buffer[NamePosition] !=
L'.' || !DontSkipDot)
214 BackTracking[BackTrackingPosition++] = ExpressionPosition * 2;
216 BackTracking[BackTrackingPosition++] = (ExpressionPosition * 2) + 3;
222 if (EndOfName)
continue;
224 if (
Name->Buffer[NamePosition] ==
L'.')
225 BackTracking[BackTrackingPosition++] = (ExpressionPosition +
sizeof(
WCHAR)) * 2;
230 if (EndOfName ||
Name->Buffer[NamePosition] ==
L'.')
continue;
232 BackTracking[BackTrackingPosition++] = (ExpressionPosition +
sizeof(
WCHAR)) * 2;
241 while (MatchingChars > OldBackTrackingPosition &&
242 BackTracking[
Position] > OldBackTracking[OldBackTrackingPosition])
244 ++OldBackTrackingPosition;
250 BackTrackingSwap = BackTracking;
251 BackTracking = OldBackTracking;
252 OldBackTracking = BackTrackingSwap;
256 Result = MatchingChars > 0 && (OldBackTracking[MatchingChars - 1] == (
Expression->Length * 2));
261 if (AllocatedBuffer !=
NULL)
326 Name1 = &UpcaseName1;
327 Name2 = &UpcaseName2;
351 return StringsAreEqual;
356 for (
i = 0;
i < Name1->Length /
sizeof(
WCHAR);
i++)
403 USHORT SkipFirstSlash = 0;
411 if (!
Name.Length)
return;
414 FirstPosition =
Name.Length /
sizeof(
WCHAR) ;
418 if (
Name.Buffer[
i] ==
L'\\')
440 if (FirstPosition < (
Name.Length /
sizeof(
WCHAR)))
#define NT_SUCCESS(StatCode)
#define ExAllocatePoolWithTag(hernya, size, tag)
NTSTATUS RtlUpcaseUnicodeString(PUNICODE_STRING dst, PUNICODE_STRING src, BOOLEAN Alloc)
_Out_ PANSI_STRING _Out_ PANSI_STRING RemainingPart
_Must_inspect_result_ _In_ PCUNICODE_STRING Name2
_Must_inspect_result_ _In_ PUNICODE_STRING _In_ BOOLEAN _In_opt_ PWCHAR UpcaseTable
#define FsRtlIsUnicodeCharacterWild(C)
_Out_ PANSI_STRING FirstPart
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define RtlEqualMemory(dst, src, len)
#define ExFreePoolWithTag(_P, _T)
DECLSPEC_NORETURN NTSYSAPI VOID NTAPI RtlRaiseStatus(_In_ NTSTATUS Status)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
_In_ ULONG _In_ ULONG Offset
BOOLEAN NTAPI FsRtlIsNameInExpression(IN PUNICODE_STRING Expression, IN PUNICODE_STRING Name, IN BOOLEAN IgnoreCase, IN PWCHAR UpcaseTable OPTIONAL)
BOOLEAN NTAPI FsRtlAreNamesEqual(IN PCUNICODE_STRING Name1, IN PCUNICODE_STRING Name2, IN BOOLEAN IgnoreCase, IN PCWCH UpcaseTable OPTIONAL)
BOOLEAN NTAPI FsRtlDoesNameContainWildCards(IN PUNICODE_STRING Name)
VOID NTAPI FsRtlDissectName(IN UNICODE_STRING Name, OUT PUNICODE_STRING FirstPart, OUT PUNICODE_STRING RemainingPart)
BOOLEAN NTAPI FsRtlIsNameInExpressionPrivate(IN PUNICODE_STRING Expression, IN PUNICODE_STRING Name, IN BOOLEAN IgnoreCase, IN PWCHAR UpcaseTable OPTIONAL)
PULONG MinorVersion OPTIONAL
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
#define POOL_RAISE_IF_ALLOCATION_FAILURE
_Out_ PSECURITY_DESCRIPTOR _Out_ PBOOLEAN MemoryAllocated