ReactOS 0.4.15-dev-7931-gfd331f1
RtlGetFullPathName_Ustr.c File Reference
#include "precomp.h"
Include dependency graph for RtlGetFullPathName_Ustr.c:

Go to the source code of this file.

Classes

struct  _PATH_TYPE_AND_UNKNOWN
 

Macros

#define ok_eq_ustr(str1, str2)
 
#define RtlPathTypeNotSet   123
 
#define broken(x)   0
 

Typedefs

typedef struct _PATH_TYPE_AND_UNKNOWN PATH_TYPE_AND_UNKNOWN
 

Enumerations

enum  PREFIX_TYPE {
  PrefixNone , PrefixCurrentDrive , PrefixCurrentPath , PrefixCurrentPathWithoutLastPart ,
  PrefixNone , PrefixCurrentDrive , PrefixCurrentPath , PrefixCurrentPathWithoutLastPart ,
  PrefixNone , PrefixCurrentDrive , PrefixCurrentPath , PrefixCurrentPathWithoutLastPart
}
 

Functions

static ULONG (NTAPI *RtlGetFullPathName_Ustr)(IN PCUNICODE_STRING FileName
 
static BOOLEAN CheckStringBuffer (PCWSTR Buffer, SIZE_T Length, SIZE_T MaximumLength, PCWSTR Expected)
 
static BOOLEAN CheckBuffer (PVOID Buffer, SIZE_T Size, UCHAR Value)
 
static VOID RunTestCases (VOID)
 
 START_TEST (RtlGetFullPathName_Ustr)
 

Variables

static IN ULONG Size
 
static IN ULONG IN PWSTR Buffer
 
static IN ULONG IN PWSTR OUT PCWSTRShortName
 
static IN ULONG IN PWSTR OUT PCWSTR OUT PBOOLEAN InvalidName
 
static IN ULONG IN PWSTR OUT PCWSTR OUT PBOOLEAN OUT PATH_TYPE_AND_UNKNOWNPathType
 

Macro Definition Documentation

◆ broken

#define broken (   x)    0

Definition at line 124 of file RtlGetFullPathName_Ustr.c.

◆ ok_eq_ustr

#define ok_eq_ustr (   str1,
  str2 
)
Value:
do { \
ok((str1)->Buffer == (str2)->Buffer, "Buffer modified\n"); \
ok((str1)->Length == (str2)->Length, "Length modified\n"); \
ok((str1)->MaximumLength == (str2)->MaximumLength, "MaximumLength modified\n"); \
} while (0)
Definition: bufpool.h:45
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
_In_ WDFDMATRANSACTION _In_ size_t MaximumLength

Definition at line 46 of file RtlGetFullPathName_Ustr.c.

◆ RtlPathTypeNotSet

#define RtlPathTypeNotSet   123

Definition at line 120 of file RtlGetFullPathName_Ustr.c.

Typedef Documentation

◆ PATH_TYPE_AND_UNKNOWN

Enumeration Type Documentation

◆ PREFIX_TYPE

Enumerator
PrefixNone 
PrefixCurrentDrive 
PrefixCurrentPath 
PrefixCurrentPathWithoutLastPart 
PrefixNone 
PrefixCurrentDrive 
PrefixCurrentPath 
PrefixCurrentPathWithoutLastPart 
PrefixNone 
PrefixCurrentDrive 
PrefixCurrentPath 
PrefixCurrentPathWithoutLastPart 

Definition at line 126 of file RtlGetFullPathName_Ustr.c.

Function Documentation

◆ CheckBuffer()

static BOOLEAN CheckBuffer ( PVOID  Buffer,
SIZE_T  Size,
UCHAR  Value 
)
static

Definition at line 103 of file RtlGetFullPathName_Ustr.c.

107{
108 PUCHAR Array = Buffer;
109 SIZE_T i;
110
111 for (i = 0; i < Size; i++)
112 if (Array[i] != Value)
113 {
114 trace("Expected %x, found %x at offset %lu\n", Value, Array[i], (ULONG)i);
115 return FALSE;
116 }
117 return TRUE;
118}
static IN ULONG IN PWSTR Buffer
static IN ULONG Size
#define trace
Definition: atltest.h:70
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
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 SIZE_T
Definition: typedefs.h:80
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413

Referenced by START_TEST().

◆ CheckStringBuffer()

static BOOLEAN CheckStringBuffer ( PCWSTR  Buffer,
SIZE_T  Length,
SIZE_T  MaximumLength,
PCWSTR  Expected 
)
static

Definition at line 54 of file RtlGetFullPathName_Ustr.c.

59{
60 SIZE_T ExpectedLength = wcslen(Expected) * sizeof(WCHAR);
61 SIZE_T EqualLength;
63 SIZE_T i;
64
65 if (Length != ExpectedLength)
66 {
67 ok(0, "String length is %lu, expected %lu\n", (ULONG)Length, (ULONG)ExpectedLength);
68 Result = FALSE;
69 }
70
71 EqualLength = RtlCompareMemory(Buffer, Expected, Length);
72 if (EqualLength != Length)
73 {
74 ok(0, "String is '%S', expected '%S'\n", Buffer, Expected);
75 Result = FALSE;
76 }
77
78 if (Buffer[Length / sizeof(WCHAR)] != UNICODE_NULL)
79 {
80 ok(0, "Not null terminated\n");
81 Result = FALSE;
82 }
83
84 /* The function nulls the rest of the buffer! */
85 for (i = Length + sizeof(UNICODE_NULL); i < MaximumLength; i++)
86 {
87 UCHAR Char = ((PUCHAR)Buffer)[i];
88 if (Char != 0)
89 {
90 ok(0, "Found 0x%x at offset %lu, expected 0x%x\n", Char, (ULONG)i, 0);
91 /* Don't count this as a failure unless the string was actually wrong */
92 //Result = FALSE;
93 /* Don't flood the log */
94 break;
95 }
96 }
97
98 return Result;
99}
BOOLEAN Expected
unsigned char BOOLEAN
#define ok(value,...)
Definition: atltest.h:57
#define RtlCompareMemory(s1, s2, l)
Definition: env_spec_w32.h:465
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define UNICODE_NULL
_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:409
unsigned char UCHAR
Definition: xmlstorage.h:181
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by RunTestCases().

◆ RunTestCases()

static VOID RunTestCases ( VOID  )
static

Definition at line 136 of file RtlGetFullPathName_Ustr.c.

137{
138 /* TODO: don't duplicate this in the other tests */
139 /* TODO: Drive Relative tests don't work yet if the current drive isn't C: */
140 struct
141 {
142 ULONG Line;
144 PREFIX_TYPE PrefixType;
145 PCWSTR FullPathName;
147 PREFIX_TYPE FilePartPrefixType;
148 SIZE_T FilePartSize;
149 } TestCases[] =
150 {
152 { __LINE__, L"C:\\", PrefixNone, L"C:\\", RtlPathTypeDriveAbsolute },
153 { __LINE__, L"C:\\test", PrefixNone, L"C:\\test", RtlPathTypeDriveAbsolute, PrefixCurrentDrive },
154 { __LINE__, L"C:\\test\\", PrefixNone, L"C:\\test\\", RtlPathTypeDriveAbsolute },
155 { __LINE__, L"C:/test/", PrefixNone, L"C:\\test\\", RtlPathTypeDriveAbsolute },
156
157 { __LINE__, L"C:\\\\test", PrefixNone, L"C:\\test", RtlPathTypeDriveAbsolute, PrefixCurrentDrive },
158 { __LINE__, L"test", PrefixCurrentPath, L"\\test", RtlPathTypeRelative, PrefixCurrentPath, sizeof(WCHAR) },
159 { __LINE__, L"\\test", PrefixCurrentDrive, L"test", RtlPathTypeRooted, PrefixCurrentDrive },
160 { __LINE__, L"/test", PrefixCurrentDrive, L"test", RtlPathTypeRooted, PrefixCurrentDrive },
161 { __LINE__, L".\\test", PrefixCurrentPath, L"\\test", RtlPathTypeRelative, PrefixCurrentPath, sizeof(WCHAR) },
162
163 { __LINE__, L"\\.", PrefixCurrentDrive, L"", RtlPathTypeRooted },
164 { __LINE__, L"\\.\\", PrefixCurrentDrive, L"", RtlPathTypeRooted },
165 { __LINE__, L"\\\\.", PrefixNone, L"\\\\.\\", RtlPathTypeRootLocalDevice },
166 { __LINE__, L"\\\\.\\", PrefixNone, L"\\\\.\\", RtlPathTypeLocalDevice },
167 { __LINE__, L"\\\\.\\Something\\", PrefixNone, L"\\\\.\\Something\\", RtlPathTypeLocalDevice },
168
169 { __LINE__, L"\\??\\", PrefixCurrentDrive, L"??\\", RtlPathTypeRooted },
170 { __LINE__, L"\\??\\C:", PrefixCurrentDrive, L"??\\C:", RtlPathTypeRooted, PrefixCurrentDrive, 3 * sizeof(WCHAR) },
171 { __LINE__, L"\\??\\C:\\", PrefixCurrentDrive, L"??\\C:\\", RtlPathTypeRooted },
172 { __LINE__, L"\\??\\C:\\test", PrefixCurrentDrive, L"??\\C:\\test", RtlPathTypeRooted, PrefixCurrentDrive, 6 * sizeof(WCHAR) },
173 { __LINE__, L"\\??\\C:\\test\\", PrefixCurrentDrive, L"??\\C:\\test\\", RtlPathTypeRooted },
174
175 { __LINE__, L"\\\\??\\", PrefixNone, L"\\\\??\\", RtlPathTypeUncAbsolute },
176 { __LINE__, L"\\\\??\\C:", PrefixNone, L"\\\\??\\C:", RtlPathTypeUncAbsolute },
177 { __LINE__, L"\\\\??\\C:\\", PrefixNone, L"\\\\??\\C:\\", RtlPathTypeUncAbsolute },
178 { __LINE__, L"\\\\??\\C:\\test", PrefixNone, L"\\\\??\\C:\\test", RtlPathTypeUncAbsolute, PrefixNone, sizeof(L"\\\\??\\C:\\") },
179 { __LINE__, L"\\\\??\\C:\\test\\", PrefixNone, L"\\\\??\\C:\\test\\", RtlPathTypeUncAbsolute },
180 };
183 WCHAR FullPathNameBuffer[MAX_PATH];
184 UNICODE_STRING TempString;
185 const WCHAR *ShortName;
188 WCHAR ExpectedPathName[MAX_PATH];
189 SIZE_T ExpectedFilePartSize;
190 const WCHAR *ExpectedShortName;
191 const INT TestCount = sizeof(TestCases) / sizeof(TestCases[0]);
192 INT i;
193 BOOLEAN Okay;
194
195 for (i = 0; i < TestCount; i++)
196 {
197 trace("i = %d\n", i);
198 switch (TestCases[i].PrefixType)
199 {
200 case PrefixNone:
201 ExpectedPathName[0] = UNICODE_NULL;
202 break;
204 GetCurrentDirectoryW(sizeof(ExpectedPathName) / sizeof(WCHAR), ExpectedPathName);
205 ExpectedPathName[3] = UNICODE_NULL;
206 break;
208 {
210 Length = GetCurrentDirectoryW(sizeof(ExpectedPathName) / sizeof(WCHAR), ExpectedPathName);
211 if (Length == 3 && TestCases[i].FullPathName[0])
212 ExpectedPathName[2] = UNICODE_NULL;
213 break;
214 }
215 default:
216 skip("Invalid test!\n");
217 continue;
218 }
219 wcscat(ExpectedPathName, TestCases[i].FullPathName);
221 RtlFillMemory(FullPathNameBuffer, sizeof(FullPathNameBuffer), 0xAA);
222 TempString = FileName;
224 PathType.Unknown = 1234;
226 NameInvalid = (BOOLEAN)-1;
227 Length = 1234;
228 StartSeh()
230 sizeof(FullPathNameBuffer),
231 FullPathNameBuffer,
232 &ShortName,
234 &PathType);
236 ok_eq_ustr(&FileName, &TempString);
237 Okay = CheckStringBuffer(FullPathNameBuffer, Length, sizeof(FullPathNameBuffer), ExpectedPathName);
238 ok(Okay, "Line %lu: Wrong path name '%S', expected '%S'\n", TestCases[i].Line, FullPathNameBuffer, ExpectedPathName);
239 switch (TestCases[i].FilePartPrefixType)
240 {
241 case PrefixNone:
242 ExpectedFilePartSize = 0;
243 break;
245 ExpectedFilePartSize = sizeof(L"C:\\");
246 break;
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 {
276 ExpectedShortName = NULL;
277 }
278 else
279 {
280 ExpectedFilePartSize = (ExpectedFilePartSize - sizeof(UNICODE_NULL)) / sizeof(WCHAR);
281 ExpectedShortName = FullPathNameBuffer + ExpectedFilePartSize;
282 }
283 ok(ShortName == ExpectedShortName,
284 "ShortName = %p, expected %p\n", ShortName, ExpectedShortName);
285 ok(NameInvalid == FALSE, "Line %lu: NameInvalid = %u\n", TestCases[i].Line, NameInvalid);
286 ok(PathType.Type == TestCases[i].PathType, "Line %lu: PathType = %d, expected %d\n", TestCases[i].Line, PathType.Type, TestCases[i].PathType);
287 ok(PathType.Unknown == 1234 ||
288 broken(PathType.Unknown == 0) ||
289 broken(PathType.Unknown == 32), "Line %lu: Unknown = %lu\n", TestCases[i].Line, PathType.Unknown);
290 }
291}
static TEST_CASE TestCases[]
Definition: CommandLine.c:101
IN PUNICODE_STRING IN PUNICODE_STRING IN PUNICODE_STRING IN PSIZE_T FilePartSize OUT PBOOLEAN NameInvalid
static IN ULONG IN PWSTR OUT PCWSTR OUT PBOOLEAN OUT PATH_TYPE_AND_UNKNOWN * PathType
static IN ULONG IN PWSTR OUT PCWSTR * ShortName
#define ok_eq_ustr(str1, str2)
static BOOLEAN CheckStringBuffer(PCWSTR Buffer, SIZE_T Length, SIZE_T MaximumLength, PCWSTR Expected)
#define RtlPathTypeNotSet
#define broken(x)
#define InvalidPointer
#define StartSeh()
Definition: _sntprintf.h:16
#define EndSeh(ExpectedStatus)
Definition: _sntprintf.h:17
#define skip(...)
Definition: atltest.h:64
#define NULL
Definition: types.h:112
#define GetCurrentDirectoryW(x, y)
Definition: compat.h:756
#define wcsrchr
Definition: compat.h:16
#define MAX_PATH
Definition: compat.h:34
static const WCHAR BackSlash[]
Definition: devclass.c:29
switch(r->id)
Definition: btrfs.c:3046
struct _FileName FileName
Definition: fatprocs.h:896
GLdouble n
Definition: glext.h:7729
#define RtlFillMemory(Dest, Length, Fill)
Definition: winternl.h:599
BOOL expected
Definition: store.c:2063
@ RtlPathTypeRootLocalDevice
Definition: rtltypes.h:478
@ RtlPathTypeDriveRelative
Definition: rtltypes.h:474
@ RtlPathTypeRelative
Definition: rtltypes.h:476
@ RtlPathTypeUncAbsolute
Definition: rtltypes.h:472
@ RtlPathTypeRooted
Definition: rtltypes.h:475
@ RtlPathTypeLocalDevice
Definition: rtltypes.h:477
@ RtlPathTypeDriveAbsolute
Definition: rtltypes.h:473
enum _RTL_PATH_TYPE RTL_PATH_TYPE
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define L(x)
Definition: ntvdm.h:50
#define BOOLEAN
Definition: pedump.c:73
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
ULONG NTAPI RtlGetFullPathName_Ustr(_In_ PUNICODE_STRING FileName, _In_ ULONG Size, _Out_z_bytecap_(Size) PWSTR Buffer, _Out_opt_ PCWSTR *ShortName, _Out_opt_ PBOOLEAN InvalidName, _Out_ RTL_PATH_TYPE *PathType)
Definition: path.c:734
#define STATUS_SUCCESS
Definition: shellext.h:65
Definition: ncftp.h:79
Definition: movable.cpp:9
Definition: name.c:39
const uint16_t * PCWSTR
Definition: typedefs.h:57
int32_t INT
Definition: typedefs.h:58
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList

Referenced by START_TEST().

◆ START_TEST()

START_TEST ( RtlGetFullPathName_Ustr  )

Definition at line 293 of file RtlGetFullPathName_Ustr.c.

294{
297 UNICODE_STRING TempString;
300 BOOLEAN NameInvalidArray[sizeof(ULONGLONG)];
302 BOOLEAN Okay;
303
305 {
306 RtlGetFullPathName_Ustr = (PVOID)GetProcAddress(GetModuleHandleW(L"ntdll"), "RtlGetFullPathName_Ustr");
308 {
309 skip("RtlGetFullPathName_Ustr unavailable\n");
310 return;
311 }
312 }
313
314 /* NULL parameters */
315 StartSeh()
318
320 TempString = FileName;
321 StartSeh()
324 ok_eq_ustr(&FileName, &TempString);
325
327 TempString = FileName;
328 StartSeh()
331 ok_eq_ustr(&FileName, &TempString);
332
334 PathType.Unknown = 1234;
335 StartSeh()
339 ok(PathType.Unknown == 1234 ||
340 broken(PathType.Unknown == 0) /* Win7 */, "Unknown = %lu\n", PathType.Unknown);
341
342 /* check what else is initialized before it crashes */
344 PathType.Unknown = 1234;
346 NameInvalid = (BOOLEAN)-1;
347 StartSeh()
352 broken(ShortName == NULL) /* Win7 */, "ShortName = %p\n", ShortName);
354 ok(PathType.Unknown == 1234 ||
355 broken(PathType.Unknown == 0) /* Win7 */, "Unknown = %lu\n", PathType.Unknown);
356
358 TempString = FileName;
360 NameInvalid = (BOOLEAN)-1;
361 StartSeh()
364 ok_eq_ustr(&FileName, &TempString);
366 broken(ShortName == NULL) /* Win7 */, "ShortName = %p\n", ShortName);
368
369 /* This is the first one that doesn't crash. FileName and PathType cannot be NULL */
371 TempString = FileName;
373 PathType.Unknown = 1234;
374 StartSeh()
376 ok(Length == 0, "Length = %lu\n", Length);
378 ok_eq_ustr(&FileName, &TempString);
380 ok(PathType.Unknown == 1234 ||
381 broken(PathType.Unknown == 0) /* Win7 */, "Unknown = %lu\n", PathType.Unknown);
382
384 TempString = FileName;
386 PathType.Unknown = 1234;
387 StartSeh()
389 ok(Length == 0, "Length = %lu\n", Length);
391 ok_eq_ustr(&FileName, &TempString);
393 ok(PathType.Unknown == 1234 ||
394 broken(PathType.Unknown == 0) /* Win7 */, "Unknown = %lu\n", PathType.Unknown);
395
396 /* Show that NameInvalid is indeed BOOLEAN */
398 TempString = FileName;
400 PathType.Unknown = 1234;
401 RtlFillMemory(NameInvalidArray, sizeof(NameInvalidArray), 0x55);
402 StartSeh()
403 Length = RtlGetFullPathName_Ustr(&FileName, 0, NULL, NULL, NameInvalidArray, &PathType);
404 ok(Length == 0, "Length = %lu\n", Length);
406 ok_eq_ustr(&FileName, &TempString);
408 ok(PathType.Unknown == 1234 ||
409 broken(PathType.Unknown == 0) /* Win7 */, "Unknown = %lu\n", PathType.Unknown);
410 ok(NameInvalidArray[0] == FALSE, "NameInvalid = %u\n", NameInvalidArray[0]);
411 Okay = CheckBuffer(NameInvalidArray + 1, sizeof(NameInvalidArray) - sizeof(NameInvalidArray[0]), 0x55);
412 ok(Okay, "CheckBuffer failed\n");
413
414 /* Give it a valid path */
416 TempString = FileName;
418 PathType.Unknown = 1234;
419 StartSeh()
421 ok(Length == sizeof(L"C:\\test"), "Length = %lu\n", Length);
423 ok_eq_ustr(&FileName, &TempString);
425 ok(PathType.Unknown == 1234 ||
426 broken(PathType.Unknown == 0) /* Win7 */, "Unknown = %lu\n", PathType.Unknown);
427
428 /* check the actual functionality with different paths */
429 RunTestCases();
430}
static VOID RunTestCases(VOID)
static BOOLEAN CheckBuffer(PVOID Buffer, SIZE_T Size, UCHAR Value)
Type
Definition: Type.h:7
Definition: terminate.cpp:24
#define GetProcAddress(x, y)
Definition: compat.h:753
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
GLfloat GLfloat p
Definition: glext.h:8902
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 * u
Definition: glfuncs.h:240
@ Unknown
Definition: i8042prt.h:114
#define d
Definition: ke_i.h:81
@ RtlPathTypeUnknown
Definition: rtltypes.h:471
#define STATUS_ACCESS_VIOLATION
Definition: ntstatus.h:242
#define test
Definition: rosglue.h:37
void * PVOID
Definition: typedefs.h:50
uint64_t ULONGLONG
Definition: typedefs.h:67

◆ ULONG()

static ULONG ( NTAPI RtlGetFullPathName_Ustr)
static

Variable Documentation

◆ Buffer

Definition at line 36 of file RtlGetFullPathName_Ustr.c.

Referenced by CheckBuffer().

◆ InvalidName

Definition at line 38 of file RtlGetFullPathName_Ustr.c.

Referenced by LdrpResolveFullName(), and RtlGetFullPathName_Ustr().

◆ PathType

◆ ShortName

IN ULONG IN PWSTR OUT PCWSTR* ShortName

Definition at line 37 of file RtlGetFullPathName_Ustr.c.

Referenced by RunTestCases(), and START_TEST().

◆ Size

Definition at line 35 of file RtlGetFullPathName_Ustr.c.

Referenced by CheckBuffer().