ReactOS  0.4.14-dev-1034-g1e60116
RtlGetFullPathName_UstrEx.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS api tests
3  * LICENSE: GPLv2+ - See COPYING in the top level directory
4  * PURPOSE: Test for RtlGetFullPathName_UstrEx
5  * PROGRAMMER: Thomas Faber <thomas.faber@reactos.org>
6  */
7 
8 #include "precomp.h"
9 
10 /*
11 NTSTATUS
12 NTAPI
13 RtlGetFullPathName_UstrEx(
14  IN PUNICODE_STRING FileName,
15  IN PUNICODE_STRING StaticString,
16  IN PUNICODE_STRING DynamicString,
17  IN PUNICODE_STRING *StringUsed,
18  IN PSIZE_T FilePartSize OPTIONAL,
19  OUT PBOOLEAN NameInvalid,
20  OUT RTL_PATH_TYPE* PathType,
21  OUT PSIZE_T LengthNeeded OPTIONAL
22 );
23 */
24 
26 (NTAPI
27 *pRtlGetFullPathName_UstrEx)(
32  IN PSIZE_T FilePartSize OPTIONAL,
36 );
37 
38 #define ok_eq_ustr(str1, str2) do { \
39  ok((str1)->Buffer == (str2)->Buffer, "Buffer modified\n"); \
40  ok((str1)->Length == (str2)->Length, "Length modified\n"); \
41  ok((str1)->MaximumLength == (str2)->MaximumLength, "MaximumLength modified\n"); \
42  } while (0)
43 
44 static
45 BOOLEAN
49 {
50  SIZE_T ExpectedLength = wcslen(Expected) * sizeof(WCHAR);
51  SIZE_T EqualLength;
53  SIZE_T i;
54 
55  if (String->Length != ExpectedLength)
56  {
57  ok(0, "String length is %u, expected %lu\n", String->Length, (ULONG)ExpectedLength);
58  Result = FALSE;
59  }
60 
61  EqualLength = RtlCompareMemory(String->Buffer, Expected, ExpectedLength);
62  if (EqualLength != ExpectedLength)
63  {
64  ok(0, "String is '%wZ', expected '%S'\n", String, Expected);
65  Result = FALSE;
66  }
67 
68  if (String->Buffer[String->Length / sizeof(WCHAR)] != UNICODE_NULL)
69  {
70  ok(0, "Not null terminated\n");
71  Result = FALSE;
72  }
73 
74  /* the function nulls the rest of the buffer! */
75  for (i = String->Length + sizeof(UNICODE_NULL); i < String->MaximumLength; i++)
76  {
77  UCHAR Char = ((PUCHAR)String->Buffer)[i];
78  if (Char != 0)
79  {
80  ok(0, "Found 0x%x at offset %lu, expected 0x%x\n", Char, (ULONG)i, 0);
81  /* don't count this as a failure unless the string was actually wrong */
82  //Result = FALSE;
83  /* don't flood the log */
84  break;
85  }
86  }
87 
88  return Result;
89 }
90 
91 static
92 BOOLEAN
94  PVOID Buffer,
95  SIZE_T Size,
96  UCHAR Value)
97 {
98  PUCHAR Array = Buffer;
99  SIZE_T i;
100 
101  for (i = 0; i < Size; i++)
102  {
103  if (Array[i] != Value)
104  {
105  trace("Expected %x, found %x at offset %lu\n", Value, Array[i], (ULONG)i);
106  return FALSE;
107  }
108  }
109  return TRUE;
110 }
111 
112 #define RtlPathTypeNotSet 123
113 
114 /* winetest_platform is "windows" for us, so broken() doesn't do what it should :( */
115 #undef broken
116 #define broken(x) 0
117 
118 typedef enum
119 {
124 } PREFIX_TYPE;
125 
126 static
127 VOID
129 {
130  /* TODO: don't duplicate this in the other tests */
131  /* TODO: Drive Relative tests don't work yet if the current drive isn't C: */
132  struct
133  {
134  ULONG Line;
136  PREFIX_TYPE PrefixType;
137  PCWSTR FullPathName;
139  PREFIX_TYPE FilePartPrefixType;
140  SIZE_T FilePartSize;
141  } TestCases[] =
142  {
143 // { __LINE__, L"C:", PrefixCurrentPath, L"", RtlPathTypeDriveRelative, PrefixCurrentPathWithoutLastPart }, // This is broken
144  { __LINE__, L"C:\\", PrefixNone, L"C:\\", RtlPathTypeDriveAbsolute },
145  { __LINE__, L"C:\\test", PrefixNone, L"C:\\test", RtlPathTypeDriveAbsolute, PrefixCurrentDrive },
146  { __LINE__, L"C:\\test\\", PrefixNone, L"C:\\test\\", RtlPathTypeDriveAbsolute },
147  { __LINE__, L"C:/test/", PrefixNone, L"C:\\test\\", RtlPathTypeDriveAbsolute },
148 
149  { __LINE__, L"C:\\\\test", PrefixNone, L"C:\\test", RtlPathTypeDriveAbsolute, PrefixCurrentDrive },
150  { __LINE__, L"test", PrefixCurrentPath, L"\\test", RtlPathTypeRelative, PrefixCurrentPath, sizeof(WCHAR) },
151  { __LINE__, L"\\test", PrefixCurrentDrive, L"test", RtlPathTypeRooted, PrefixCurrentDrive },
152  { __LINE__, L"/test", PrefixCurrentDrive, L"test", RtlPathTypeRooted, PrefixCurrentDrive },
153  { __LINE__, L".\\test", PrefixCurrentPath, L"\\test", RtlPathTypeRelative, PrefixCurrentPath, sizeof(WCHAR) },
154 
155  { __LINE__, L"\\.", PrefixCurrentDrive, L"", RtlPathTypeRooted },
156  { __LINE__, L"\\.\\", PrefixCurrentDrive, L"", RtlPathTypeRooted },
157  { __LINE__, L"\\\\.", PrefixNone, L"\\\\.\\", RtlPathTypeRootLocalDevice },
158  { __LINE__, L"\\\\.\\", PrefixNone, L"\\\\.\\", RtlPathTypeLocalDevice },
159  { __LINE__, L"\\\\.\\Something\\", PrefixNone, L"\\\\.\\Something\\", RtlPathTypeLocalDevice },
160 
161  { __LINE__, L"\\??\\", PrefixCurrentDrive, L"??\\", RtlPathTypeRooted },
162  { __LINE__, L"\\??\\C:", PrefixCurrentDrive, L"??\\C:", RtlPathTypeRooted, PrefixCurrentDrive, 3 * sizeof(WCHAR) },
163  { __LINE__, L"\\??\\C:\\", PrefixCurrentDrive, L"??\\C:\\", RtlPathTypeRooted },
164  { __LINE__, L"\\??\\C:\\test", PrefixCurrentDrive, L"??\\C:\\test", RtlPathTypeRooted, PrefixCurrentDrive, 6 * sizeof(WCHAR) },
165  { __LINE__, L"\\??\\C:\\test\\", PrefixCurrentDrive, L"??\\C:\\test\\", RtlPathTypeRooted },
166 
167  { __LINE__, L"\\\\??\\", PrefixNone, L"\\\\??\\", RtlPathTypeUncAbsolute },
168  { __LINE__, L"\\\\??\\C:", PrefixNone, L"\\\\??\\C:", RtlPathTypeUncAbsolute },
169  { __LINE__, L"\\\\??\\C:\\", PrefixNone, L"\\\\??\\C:\\", RtlPathTypeUncAbsolute },
170  { __LINE__, L"\\\\??\\C:\\test", PrefixNone, L"\\\\??\\C:\\test", RtlPathTypeUncAbsolute, PrefixNone, sizeof(L"\\\\??\\C:\\") },
171  { __LINE__, L"\\\\??\\C:\\test\\", PrefixNone, L"\\\\??\\C:\\test\\", RtlPathTypeUncAbsolute },
172  };
175  UNICODE_STRING FullPathName;
176  WCHAR FullPathNameBuffer[MAX_PATH];
177  UNICODE_STRING TempString;
179  SIZE_T FilePartSize;
183  WCHAR ExpectedPathName[MAX_PATH];
184  SIZE_T ExpectedFilePartSize;
185  const INT TestCount = sizeof(TestCases) / sizeof(TestCases[0]);
186  INT i;
187  BOOLEAN Okay;
188 
189  for (i = 0; i < TestCount; i++)
190  {
191  switch (TestCases[i].PrefixType)
192  {
193  case PrefixNone:
194  ExpectedPathName[0] = UNICODE_NULL;
195  break;
196  case PrefixCurrentDrive:
197  GetCurrentDirectoryW(sizeof(ExpectedPathName) / sizeof(WCHAR), ExpectedPathName);
198  ExpectedPathName[3] = UNICODE_NULL;
199  break;
200  case PrefixCurrentPath:
201  {
202  ULONG Length;
203  Length = GetCurrentDirectoryW(sizeof(ExpectedPathName) / sizeof(WCHAR), ExpectedPathName);
204  if (Length == 3 && TestCases[i].FullPathName[0])
205  ExpectedPathName[2] = UNICODE_NULL;
206  break;
207  }
208  default:
209  skip("Invalid test!\n");
210  continue;
211  }
212  wcscat(ExpectedPathName, TestCases[i].FullPathName);
214  RtlInitEmptyUnicodeString(&FullPathName, FullPathNameBuffer, sizeof(FullPathNameBuffer));
215  RtlFillMemory(FullPathName.Buffer, FullPathName.MaximumLength, 0xAA);
216  TempString = FileName;
219  FilePartSize = 1234;
220  NameInvalid = (BOOLEAN)-1;
221  LengthNeeded = 1234;
222  StartSeh()
223  Status = pRtlGetFullPathName_UstrEx(&FileName,
224  &FullPathName,
225  NULL,
226  &StringUsed,
227  &FilePartSize,
228  &NameInvalid,
229  &PathType,
230  &LengthNeeded);
231  ok(Status == STATUS_SUCCESS, "Line %lu: status = %lx\n", TestCases[i].Line, Status);
233  ok_eq_ustr(&FileName, &TempString);
234  ok(FullPathName.Buffer == FullPathNameBuffer, "Line %lu: Buffer modified\n", TestCases[i].Line);
235  ok(FullPathName.MaximumLength == sizeof(FullPathNameBuffer), "Line %lu: MaximumLength modified\n", TestCases[i].Line);
236  Okay = CheckStringBuffer(&FullPathName, ExpectedPathName);
237  ok(Okay, "Line %lu: Wrong path name '%wZ', expected '%S'\n", TestCases[i].Line, &FullPathName, ExpectedPathName);
238  ok(StringUsed == &FullPathName, "Line %lu: StringUsed = %p, expected %p\n", TestCases[i].Line, StringUsed, &FullPathName);
239  switch (TestCases[i].FilePartPrefixType)
240  {
241  case PrefixNone:
242  ExpectedFilePartSize = 0;
243  break;
244  case PrefixCurrentDrive:
245  ExpectedFilePartSize = sizeof(L"C:\\");
246  break;
247  case PrefixCurrentPath:
248  ExpectedFilePartSize = GetCurrentDirectoryW(0, NULL) * sizeof(WCHAR);
249  if (ExpectedFilePartSize == sizeof(L"C:\\"))
250  ExpectedFilePartSize -= sizeof(WCHAR);
251  break;
253  {
254  WCHAR CurrentPath[MAX_PATH];
256  ExpectedFilePartSize = GetCurrentDirectoryW(sizeof(CurrentPath) / sizeof(WCHAR), CurrentPath) * sizeof(WCHAR) + sizeof(UNICODE_NULL);
257  if (ExpectedFilePartSize == sizeof(L"C:\\"))
258  ExpectedFilePartSize = 0;
259  else
260  {
261  BackSlash = wcsrchr(CurrentPath, L'\\');
262  if (BackSlash)
263  ExpectedFilePartSize -= wcslen(BackSlash + 1) * sizeof(WCHAR);
264  else
265  ok(0, "Line %lu: GetCurrentDirectory returned %S\n", TestCases[i].Line, CurrentPath);
266  }
267  break;
268  }
269  default:
270  skip("Invalid test!\n");
271  continue;
272  }
273  ExpectedFilePartSize += TestCases[i].FilePartSize;
274  if (ExpectedFilePartSize != 0)
275  ExpectedFilePartSize = (ExpectedFilePartSize - sizeof(UNICODE_NULL)) / sizeof(WCHAR);
276  ok(FilePartSize == ExpectedFilePartSize,
277  "Line %lu: FilePartSize = %lu, expected %lu\n", TestCases[i].Line, (ULONG)FilePartSize, (ULONG)ExpectedFilePartSize);
278  ok(NameInvalid == FALSE, "Line %lu: NameInvalid = %u\n", TestCases[i].Line, NameInvalid);
279  ok(PathType == TestCases[i].PathType, "Line %lu: PathType = %d, expected %d\n", TestCases[i].Line, PathType, TestCases[i].PathType);
280  ok(LengthNeeded == 0, "Line %lu: LengthNeeded = %lu\n", TestCases[i].Line, (ULONG)LengthNeeded);
281  }
282 }
283 
285 {
288  UNICODE_STRING TempString;
291  SIZE_T FilePartSize;
293  BOOLEAN NameInvalidArray[sizeof(ULONGLONG)];
296  BOOLEAN Okay;
297 
298  pRtlGetFullPathName_UstrEx = (PVOID)GetProcAddress(GetModuleHandleW(L"ntdll"), "RtlGetFullPathName_UstrEx");
299  if (!pRtlGetFullPathName_UstrEx)
300  {
301  skip("RtlGetFullPathName_UstrEx unavailable\n");
302  return;
303  }
304 
305  /* NULL parameters */
306  StartSeh()
307  pRtlGetFullPathName_UstrEx(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
309 
311  TempString = FileName;
312  StartSeh()
313  pRtlGetFullPathName_UstrEx(&FileName, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
315  ok_eq_ustr(&FileName, &TempString);
316 
318  TempString = FileName;
319  StartSeh()
320  pRtlGetFullPathName_UstrEx(&FileName, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
322  ok_eq_ustr(&FileName, &TempString);
323 
325  StartSeh()
326  pRtlGetFullPathName_UstrEx(NULL, NULL, NULL, NULL, NULL, NULL, &PathType, NULL);
328  ok(PathType == RtlPathTypeNotSet, "PathType = %d\n", PathType);
329 
330  /* Check what else is initialized before it crashes */
333  FilePartSize = 1234;
334  NameInvalid = (BOOLEAN)-1;
335  LengthNeeded = 1234;
336  StartSeh()
337  pRtlGetFullPathName_UstrEx(NULL, NULL, NULL, &StringUsed, &FilePartSize, &NameInvalid, &PathType, &LengthNeeded);
339  ok(StringUsed == NULL, "StringUsed = %p\n", StringUsed);
340  ok(FilePartSize == 0, "FilePartSize = %lu\n", (ULONG)FilePartSize);
341  ok(NameInvalid == FALSE, "NameInvalid = %u\n", NameInvalid);
342  ok(PathType == RtlPathTypeNotSet, "PathType = %d\n", PathType);
343  ok(LengthNeeded == 0, "LengthNeeded = %lu\n", (ULONG)LengthNeeded);
344 
346  TempString = FileName;
348  FilePartSize = 1234;
349  NameInvalid = (BOOLEAN)-1;
350  LengthNeeded = 1234;
351  StartSeh()
352  pRtlGetFullPathName_UstrEx(&FileName, NULL, NULL, &StringUsed, &FilePartSize, &NameInvalid, NULL, &LengthNeeded);
354  ok_eq_ustr(&FileName, &TempString);
355  ok(StringUsed == NULL, "StringUsed = %p\n", StringUsed);
356  ok(FilePartSize == 0, "FilePartSize = %lu\n", (ULONG)FilePartSize);
357  ok(NameInvalid == (BOOLEAN)-1, "NameInvalid = %u\n", NameInvalid);
358  ok(LengthNeeded == 0, "LengthNeeded = %lu\n", (ULONG)LengthNeeded);
359 
360  /* This is the first one that doesn't crash. FileName and PathType cannot be NULL */
362  TempString = FileName;
364  StartSeh()
365  Status = pRtlGetFullPathName_UstrEx(&FileName, NULL, NULL, NULL, NULL, NULL, &PathType, NULL);
366  ok(Status == STATUS_OBJECT_NAME_INVALID, "status = %lx\n", Status);
368  ok_eq_ustr(&FileName, &TempString);
369  ok(PathType == RtlPathTypeUnknown, "PathType = %d\n", PathType);
370 
372  TempString = FileName;
374  StartSeh()
375  Status = pRtlGetFullPathName_UstrEx(&FileName, NULL, NULL, NULL, NULL, NULL, &PathType, NULL);
376  ok(Status == STATUS_OBJECT_NAME_INVALID, "status = %lx\n", Status);
378  ok_eq_ustr(&FileName, &TempString);
379  ok(PathType == RtlPathTypeUnknown, "PathType = %d\n", PathType);
380 
381  /* Show that NameInvalid is indeed BOOLEAN */
383  TempString = FileName;
385  RtlFillMemory(NameInvalidArray, sizeof(NameInvalidArray), 0x55);
386  StartSeh()
387  Status = pRtlGetFullPathName_UstrEx(&FileName, NULL, NULL, NULL, NULL, NameInvalidArray, &PathType, NULL);
388  ok(Status == STATUS_OBJECT_NAME_INVALID, "status = %lx\n", Status);
390  ok_eq_ustr(&FileName, &TempString);
391  ok(PathType == RtlPathTypeUnknown, "PathType = %d\n", PathType);
392  ok(NameInvalidArray[0] == FALSE, "NameInvalid = %u\n", NameInvalidArray[0]);
393  Okay = CheckBuffer(NameInvalidArray + 1, sizeof(NameInvalidArray) - sizeof(NameInvalidArray[0]), 0x55);
394  ok(Okay, "CheckBuffer failed\n");
395 
396  /* Give it a valid path */
397  RtlInitUnicodeString(&FileName, L"C:\\test");
398  TempString = FileName;
400  StartSeh()
401  Status = pRtlGetFullPathName_UstrEx(&FileName, NULL, NULL, NULL, NULL, NULL, &PathType, NULL);
402  ok(Status == STATUS_BUFFER_TOO_SMALL, "status = %lx\n", Status);
404  ok_eq_ustr(&FileName, &TempString);
405  ok(PathType == RtlPathTypeDriveAbsolute, "PathType = %d\n", PathType);
406 
407  /* Zero-length static string */
408  RtlInitUnicodeString(&FileName, L"C:\\test");
409  TempString = FileName;
412  StartSeh()
413  Status = pRtlGetFullPathName_UstrEx(&FileName, &StaticString, NULL, NULL, NULL, NULL, &PathType, NULL);
414  ok(Status == STATUS_BUFFER_TOO_SMALL, "status = %lx\n", Status);
416  ok_eq_ustr(&FileName, &TempString);
417  ok(PathType == RtlPathTypeDriveAbsolute, "PathType = %d\n", PathType);
418 
419  /* TODO: play around with StaticString and DynamicString */
420 
421  /* Check the actual functionality with different paths */
422  RunTestCases();
423 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2374
enum _RTL_PATH_TYPE RTL_PATH_TYPE
const uint16_t * PCWSTR
Definition: typedefs.h:56
#define IN
Definition: typedefs.h:39
#define TRUE
Definition: types.h:120
unsigned char * PUCHAR
Definition: retypes.h:3
static BOOLEAN CheckBuffer(PVOID Buffer, SIZE_T Size, UCHAR Value)
LONG NTSTATUS
Definition: precomp.h:26
#define GetCurrentDirectoryW(x, y)
Definition: compat.h:421
NTSTATUS NTAPI RtlGetFullPathName_UstrEx(_In_ PUNICODE_STRING FileName, _In_opt_ PUNICODE_STRING StaticString, _In_opt_ PUNICODE_STRING DynamicString, _Out_opt_ PUNICODE_STRING *StringUsed, _Out_opt_ PSIZE_T FilePartSize, _Out_opt_ PBOOLEAN NameInvalid, _Out_ RTL_PATH_TYPE *PathType, _Out_opt_ PSIZE_T LengthNeeded)
static WCHAR String[]
Definition: stringtable.c:55
#define StartSeh()
Definition: _sntprintf.h:16
int32_t INT
Definition: typedefs.h:57
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
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
Definition: glfuncs.h:248
ULONG_PTR * PSIZE_T
Definition: typedefs.h:79
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define UNICODE_NULL
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
_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
Definition: wsk.h:426
_Check_return_ _CRTIMP _CONST_RETURN wchar_t *__cdecl wcsrchr(_In_z_ const wchar_t *_Str, _In_ wchar_t _Ch)
Definition: bufpool.h:45
void * PVOID
Definition: retypes.h:9
#define InvalidPointer
static BOOLEAN CheckStringBuffer(PCUNICODE_STRING String, PCWSTR Expected)
#define ok_eq_ustr(str1, str2)
#define trace
Definition: atltest.h:70
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define RtlFillMemory(Dest, Length, Fill)
Definition: winternl.h:593
uint64_t ULONGLONG
Definition: typedefs.h:66
#define MAX_PATH
Definition: compat.h:26
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
IN PUNICODE_STRING IN PUNICODE_STRING IN PUNICODE_STRING IN PSIZE_T FilePartSize OUT PBOOLEAN OUT RTL_PATH_TYPE * PathType
Definition: ncftp.h:79
static TEST_CASE TestCases[]
Definition: CommandLine.c:101
unsigned char UCHAR
Definition: xmlstorage.h:181
char * PBOOLEAN
Definition: retypes.h:11
static const WCHAR L[]
Definition: oid.c:1250
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
START_TEST(RtlGetFullPathName_UstrEx)
Status
Definition: gdiplustypes.h:24
UnicodeString MaximumLength
Definition: rtlfuncs.h:2982
ULONG_PTR SIZE_T
Definition: typedefs.h:79
struct _FileName FileName
Definition: fatprocs.h:884
IN PUNICODE_STRING IN PUNICODE_STRING IN PUNICODE_STRING IN PSIZE_T FilePartSize OUT PBOOLEAN NameInvalid
#define STATUS_ACCESS_VIOLATION
Definition: ntstatus.h:228
#define ok(value,...)
Definition: atltest.h:57
#define STATUS_OBJECT_NAME_INVALID
Definition: udferr_usr.h:148
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
NTSTATUS(NTAPI *pRtlGetFullPathName_UstrEx)(IN PUNICODE_STRING FileName
#define skip(...)
Definition: atltest.h:64
IN PUNICODE_STRING IN PUNICODE_STRING IN PUNICODE_STRING IN PSIZE_T FilePartSize OPTIONAL
#define BOOLEAN
Definition: pedump.c:73
#define OUT
Definition: typedefs.h:40
unsigned int ULONG
Definition: retypes.h:1
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:847
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define RtlPathTypeNotSet
#define GetProcAddress(x, y)
Definition: compat.h:418
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ SECURITY_INFORMATION _In_ ULONG _Out_opt_ PULONG LengthNeeded
Definition: fltkernel.h:1342
IN PUNICODE_STRING IN PUNICODE_STRING IN PUNICODE_STRING * StringUsed
BOOLEAN Expected
static VOID RunTestCases(VOID)
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
static const WCHAR BackSlash[]
Definition: devclass.c:29
return STATUS_SUCCESS
Definition: btrfs.c:2938
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
IN PUNICODE_STRING StaticString
struct Line Line
#define RtlCompareMemory(s1, s2, l)
Definition: env_spec_w32.h:465
#define EndSeh(ExpectedStatus)
Definition: _sntprintf.h:17
IN PUNICODE_STRING IN PUNICODE_STRING DynamicString