ReactOS 0.4.15-dev-7942-gd23573b
RtlDetermineDosPathNameType.c File Reference
#include "precomp.h"
Include dependency graph for RtlDetermineDosPathNameType.c:

Go to the source code of this file.

Functions

static ULONG (NTAPI *RtlDetermineDosPathNameType_Ustr)(IN PCUNICODE_STRING Path)
 
 START_TEST (RtlDetermineDosPathNameType)
 

Function Documentation

◆ START_TEST()

START_TEST ( RtlDetermineDosPathNameType  )

Definition at line 33 of file RtlDetermineDosPathNameType.c.

34{
36 struct
37 {
40 } Tests[] =
41 {
43 { L"xyz", RtlPathTypeRelative },
44 { L"CON", RtlPathTypeRelative },
45 { L"NUL", RtlPathTypeRelative },
46 { L":", RtlPathTypeRelative },
49 { L"::::", RtlPathTypeDriveRelative },
50 { L"::\\", RtlPathTypeDriveAbsolute },
51 { L"\\", RtlPathTypeRooted },
52 { L"\\:", RtlPathTypeRooted },
53 { L"\\C:", RtlPathTypeRooted },
54 { L"\\C:\\", RtlPathTypeRooted },
55 { L"/", RtlPathTypeRooted },
56 { L"/:", RtlPathTypeRooted },
57 { L"/C:", RtlPathTypeRooted },
58 { L"/C:/", RtlPathTypeRooted },
59 { L"C", RtlPathTypeRelative },
62 { L"C:a\\", RtlPathTypeDriveRelative },
63 { L"C:\\", RtlPathTypeDriveAbsolute },
65 { L"C:\\a", RtlPathTypeDriveAbsolute },
66 { L"C:/a", RtlPathTypeDriveAbsolute },
67 { L"C:\\\\", RtlPathTypeDriveAbsolute },
68 { L"\\\\", RtlPathTypeUncAbsolute },
69 { L"\\\\\\", RtlPathTypeUncAbsolute },
70 { L"\\\\;", RtlPathTypeUncAbsolute },
71 { L"\\\\f\\b\\", RtlPathTypeUncAbsolute },
72 { L"\\\\f\\b", RtlPathTypeUncAbsolute },
73 { L"\\\\f\\", RtlPathTypeUncAbsolute },
74 { L"\\\\f", RtlPathTypeUncAbsolute },
75 { L"\\??\\", RtlPathTypeRooted },
76 { L"\\??\\UNC", RtlPathTypeRooted },
77 { L"\\??\\UNC\\", RtlPathTypeRooted },
78 { L"\\?", RtlPathTypeRooted },
79 { L"\\?\\", RtlPathTypeRooted },
80 { L"\\?\\UNC", RtlPathTypeRooted },
81 { L"\\?\\UNC\\", RtlPathTypeRooted },
82 { L"\\\\?\\UNC\\", RtlPathTypeLocalDevice },
83 { L"\\\\?", RtlPathTypeRootLocalDevice },
84 { L"\\\\??", RtlPathTypeUncAbsolute },
85 { L"\\\\??\\", RtlPathTypeUncAbsolute },
86 { L"\\\\??\\C:\\", RtlPathTypeUncAbsolute },
87 { L"\\\\.", RtlPathTypeRootLocalDevice },
88 { L"\\\\.\\", RtlPathTypeLocalDevice },
89 { L"\\\\.\\C:\\", RtlPathTypeLocalDevice },
90 { L"\\/", RtlPathTypeUncAbsolute },
91 { L"/\\", RtlPathTypeUncAbsolute },
93 { L"///", RtlPathTypeUncAbsolute },
94 { L"//;", RtlPathTypeUncAbsolute },
98 { L"//??", RtlPathTypeUncAbsolute },
99 { L"//?" L"?/", RtlPathTypeUncAbsolute },
100 { L"//?" L"?/C:/", RtlPathTypeUncAbsolute },
102 { L"\\/.", RtlPathTypeRootLocalDevice },
103 { L"/\\.", RtlPathTypeRootLocalDevice },
104 { L"//./", RtlPathTypeLocalDevice },
105 { L"//./C:/", RtlPathTypeLocalDevice },
106 { L"%SystemRoot%", RtlPathTypeRelative },
107 };
108 ULONG i;
111
113 {
114 RtlDetermineDosPathNameType_Ustr = (PVOID)GetProcAddress(GetModuleHandleW(L"ntdll"), "RtlDetermineDosPathNameType_Ustr");
116 skip("RtlDetermineDosPathNameType_Ustr unavailable\n");
117 }
118
120
122 {
123 UNICODE_STRING PathString;
125
126 RtlInitEmptyUnicodeString(&PathString, NULL, MAXUSHORT);
129 }
130
131 for (i = 0; i < sizeof(Tests) / sizeof(Tests[0]); i++)
132 {
133 Length = (USHORT)wcslen(Tests[i].FileName) * sizeof(WCHAR);
137 StartSeh()
142
144 {
145 UNICODE_STRING PathString;
146
150 PathString.Buffer = FileName;
151 PathString.Length = Length;
152 PathString.MaximumLength = MAXUSHORT;
153 StartSeh()
158 }
159 }
160}
struct test_data Tests[]
static IN ULONG IN PWSTR OUT PCWSTR OUT PBOOLEAN OUT PATH_TYPE_AND_UNKNOWN * PathType
#define StartSeh()
Definition: _sntprintf.h:16
#define EndSeh(ExpectedStatus)
Definition: _sntprintf.h:17
static VOID MakeReadOnly(PVOID Pointer, SIZE_T SizeRequested)
Definition: apitest_guard.h:59
static VOID FreeGuarded(_In_ PVOID Pointer)
Definition: apitest_guard.h:45
static PVOID AllocateGuarded(_In_ SIZE_T SizeRequested)
Definition: apitest_guard.h:10
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define NULL
Definition: types.h:112
#define GetProcAddress(x, y)
Definition: compat.h:753
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
struct _FileName FileName
Definition: fatprocs.h:896
GLdouble n
Definition: glext.h:7729
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
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define d
Definition: ke_i.h:81
if(dx< 0)
Definition: linetemp.h:194
#define for
Definition: utility.h:88
BOOL expected
Definition: store.c:2063
NTSYSAPI RTL_PATH_TYPE NTAPI RtlDetermineDosPathNameType_U(_In_ PCWSTR Path)
@ 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
#define UNICODE_NULL
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define STATUS_ACCESS_VIOLATION
Definition: ntstatus.h:242
#define L(x)
Definition: ntvdm.h:50
unsigned short USHORT
Definition: pedump.c:61
RTL_PATH_TYPE NTAPI RtlDetermineDosPathNameType_Ustr(IN PCUNICODE_STRING PathString)
Definition: path.c:61
#define STATUS_SUCCESS
Definition: shellext.h:65
Definition: movable.cpp:9
USHORT MaximumLength
Definition: env_spec_w32.h:370
uint16_t * PWSTR
Definition: typedefs.h:56
const uint16_t * PCWSTR
Definition: typedefs.h:57
void * PVOID
Definition: typedefs.h:50
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define MAXUSHORT
Definition: typedefs.h:83
uint32_t ULONG
Definition: typedefs.h:59
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ ULONG()

static ULONG ( NTAPI RtlDetermineDosPathNameType_Ustr)
static