20 WCHAR QueriedTargetBuffer[32];
26 for (
i = 0;
i < 2;
i++)
38 RtlInitEmptyUnicodeString(&QueriedTarget,
NULL, 0);
40 Status = ZwQuerySymbolicLinkObject(LinkHandle,
50 RtlInitEmptyUnicodeString(&QueriedTarget,
52 ExpectedTarget->
Length - 1);
53 RtlFillMemory(&QueriedTargetBuffer,
sizeof(QueriedTargetBuffer), 0x55);
55 Status = ZwQuerySymbolicLinkObject(LinkHandle,
66 RtlInitEmptyUnicodeString(&QueriedTarget,
69 RtlFillMemory(&QueriedTargetBuffer,
sizeof(QueriedTargetBuffer), 0x55);
71 Status = ZwQuerySymbolicLinkObject(LinkHandle,
93 RtlInitEmptyUnicodeString(&QueriedTarget,
95 ExpectedTarget->
Length + 1);
96 RtlFillMemory(&QueriedTargetBuffer,
sizeof(QueriedTargetBuffer), 0x55);
98 Status = ZwQuerySymbolicLinkObject(LinkHandle,
120 RtlInitEmptyUnicodeString(&QueriedTarget,
123 RtlFillMemory(&QueriedTargetBuffer,
sizeof(QueriedTargetBuffer), 0x55);
125 Status = ZwQuerySymbolicLinkObject(LinkHandle,
135 if (ExpectedTarget->MaximumLength >= ExpectedTarget->Length +
sizeof(
UNICODE_NULL))
145 RtlInitEmptyUnicodeString(&QueriedTarget,
147 sizeof(QueriedTargetBuffer));
148 RtlFillMemory(&QueriedTargetBuffer,
sizeof(QueriedTargetBuffer), 0x55);
150 Status = ZwQuerySymbolicLinkObject(LinkHandle,
160 if (ExpectedTarget->MaximumLength >= ExpectedTarget->Length +
sizeof(
UNICODE_NULL))
static VOID TestQueryLink(_In_ HANDLE LinkHandle, _In_ PCUNICODE_STRING ExpectedTarget)
#define ok_eq_pointer(value, expected)
#define ok_eq_hex(value, expected)
#define ok_eq_ulong(value, expected)
#define ok_eq_uint(value, expected)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
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 OBJ_KERNEL_HANDLE
#define OBJ_CASE_INSENSITIVE
#define RtlFillMemory(Dest, Length, Fill)
#define KmtInvalidPointer
#define InitializeObjectAttributes(p, n, a, r, s)
NTSYSAPI NTSTATUS NTAPI ZwOpenSymbolicLinkObject(_Out_ PHANDLE SymbolicLinkHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
NTSYSAPI NTSTATUS NTAPI ZwCreateSymbolicLinkObject(_Out_ PHANDLE SymbolicLinkHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes, _In_ PUNICODE_STRING Name)
#define SYMBOLIC_LINK_QUERY
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
#define STATUS_ACCESS_VIOLATION
NTSTATUS NTAPI ObCloseHandle(IN HANDLE Handle, IN KPROCESSOR_MODE AccessMode)
#define STATUS_BUFFER_TOO_SMALL
#define RTL_CONSTANT_STRING(s)
#define STATUS_OBJECT_NAME_NOT_FOUND
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
_Inout_ PUNICODE_STRING LinkTarget