1 /* Unit test suite for Ntdll directory functions
3 * Copyright 2007 Jeff Latimer
4 * Copyright 2007 Andrey Turkin
5 * Copyright 2008 Jeff Zaroyko
6 * Copyright 2009 Dan Kegel
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 * We use function pointers here as there is no import library for NTDLL on
31 /* Define WIN32_NO_STATUS so MSVC does not give us duplicate macro
32 * definition errors when we get to winnt.h
34 #define WIN32_NO_STATUS
36 #include "wine/test.h"
39 static NTSTATUS (WINAPI
*pNtClose
)( PHANDLE
);
40 static NTSTATUS (WINAPI
*pNtOpenFile
) ( PHANDLE
, ACCESS_MASK
, POBJECT_ATTRIBUTES
, PIO_STATUS_BLOCK
, ULONG
, ULONG
);
41 static NTSTATUS (WINAPI
*pNtQueryDirectoryFile
)(HANDLE
,HANDLE
,PIO_APC_ROUTINE
,PVOID
,PIO_STATUS_BLOCK
,
42 PVOID
,ULONG
,FILE_INFORMATION_CLASS
,BOOLEAN
,PUNICODE_STRING
,BOOLEAN
);
43 static BOOLEAN (WINAPI
*pRtlCreateUnicodeStringFromAsciiz
)(PUNICODE_STRING
,LPCSTR
);
44 static BOOL (WINAPI
*pRtlDosPathNameToNtPathName_U
)( LPCWSTR
, PUNICODE_STRING
, PWSTR
*, CURDIR
* );
45 static VOID (WINAPI
*pRtlInitUnicodeString
)( PUNICODE_STRING
, LPCWSTR
);
46 static VOID (WINAPI
*pRtlFreeUnicodeString
)( PUNICODE_STRING
);
47 static NTSTATUS (WINAPI
*pRtlMultiByteToUnicodeN
)( LPWSTR dst
, DWORD dstlen
, LPDWORD reslen
,
48 LPCSTR src
, DWORD srclen
);
49 static NTSTATUS (WINAPI
*pRtlWow64EnableFsRedirection
)( BOOLEAN enable
);
50 static NTSTATUS (WINAPI
*pRtlWow64EnableFsRedirectionEx
)( ULONG disable
, ULONG
*old_value
);
52 /* The attribute sets to test */
53 static struct testfile_s
{
54 BOOL todo
; /* set if it doesn't work on wine yet */
55 BOOL attr_done
; /* set if attributes were tested for this file already */
56 const DWORD attr
; /* desired attribute */
57 const char *name
; /* filename to use */
58 const char *target
; /* what to point to (only for reparse pts) */
59 const char *description
; /* for error messages */
60 int nfound
; /* How many were found (expect 1) */
61 WCHAR nameW
[20]; /* unicode version of name (filled in later) */
63 { 0, 0, FILE_ATTRIBUTE_NORMAL
, "longfilename.tmp", NULL
, "normal" },
64 { 0, 0, FILE_ATTRIBUTE_NORMAL
, "n.tmp", NULL
, "normal" },
65 { 1, 0, FILE_ATTRIBUTE_HIDDEN
, "h.tmp", NULL
, "hidden" },
66 { 1, 0, FILE_ATTRIBUTE_SYSTEM
, "s.tmp", NULL
, "system" },
67 { 0, 0, FILE_ATTRIBUTE_DIRECTORY
, "d.tmp", NULL
, "directory" },
68 { 0, 0, FILE_ATTRIBUTE_DIRECTORY
, ".", NULL
, ". directory" },
69 { 0, 0, FILE_ATTRIBUTE_DIRECTORY
, "..", NULL
, ".. directory" },
72 static const int max_test_dir_size
= 20; /* size of above plus some for .. etc */
74 /* Create a test directory full of attribute test files, clear counts */
75 static void set_up_attribute_test(const char *testdirA
)
80 ret
= CreateDirectoryA(testdirA
, NULL
);
81 ok(ret
, "couldn't create dir '%s', error %d\n", testdirA
, GetLastError());
83 for (i
=0; testfiles
[i
].name
; i
++) {
85 pRtlMultiByteToUnicodeN(testfiles
[i
].nameW
, sizeof(testfiles
[i
].nameW
), NULL
, testfiles
[i
].name
, strlen(testfiles
[i
].name
)+1);
87 if (strcmp(testfiles
[i
].name
, ".") == 0 || strcmp(testfiles
[i
].name
, "..") == 0)
89 sprintf(buf
, "%s\\%s", testdirA
, testfiles
[i
].name
);
90 if (testfiles
[i
].attr
& FILE_ATTRIBUTE_DIRECTORY
) {
91 ret
= CreateDirectoryA(buf
, NULL
);
92 ok(ret
, "couldn't create dir '%s', error %d\n", buf
, GetLastError());
94 HANDLE h
= CreateFileA(buf
,
95 GENERIC_READ
|GENERIC_WRITE
,
96 0, NULL
, CREATE_ALWAYS
,
97 testfiles
[i
].attr
, 0);
98 ok( h
!= INVALID_HANDLE_VALUE
, "failed to create temp file '%s'\n", buf
);
104 static void reset_found_files(void)
108 for (i
= 0; testfiles
[i
].name
; i
++)
109 testfiles
[i
].nfound
= 0;
112 /* Remove the given test directory and the attribute test files, if any */
113 static void tear_down_attribute_test(const char *testdirA
)
117 for (i
=0; testfiles
[i
].name
; i
++) {
120 if (strcmp(testfiles
[i
].name
, ".") == 0 || strcmp(testfiles
[i
].name
, "..") == 0)
122 sprintf(buf
, "%s\\%s", testdirA
, testfiles
[i
].name
);
123 if (testfiles
[i
].attr
& FILE_ATTRIBUTE_DIRECTORY
) {
124 ret
= RemoveDirectoryA(buf
);
125 ok(ret
|| (GetLastError() == ERROR_PATH_NOT_FOUND
),
126 "Failed to rmdir %s, error %d\n", buf
, GetLastError());
128 ret
= DeleteFileA(buf
);
129 ok(ret
|| (GetLastError() == ERROR_PATH_NOT_FOUND
),
130 "Failed to rm %s, error %d\n", buf
, GetLastError());
133 RemoveDirectoryA(testdirA
);
136 /* Match one found file against testfiles[], increment count if found */
137 static void tally_test_file(FILE_BOTH_DIRECTORY_INFORMATION
*dir_info
)
141 (FILE_ATTRIBUTE_SYSTEM
|FILE_ATTRIBUTE_HIDDEN
|FILE_ATTRIBUTE_DIRECTORY
|FILE_ATTRIBUTE_REPARSE_POINT
);
142 DWORD attrib
= dir_info
->FileAttributes
& attribmask
;
143 WCHAR
*nameW
= dir_info
->FileName
;
144 int namelen
= dir_info
->FileNameLength
/ sizeof(WCHAR
);
146 for (i
=0; testfiles
[i
].name
; i
++) {
147 int len
= strlen(testfiles
[i
].name
);
148 if (namelen
!= len
|| memcmp(nameW
, testfiles
[i
].nameW
, len
*sizeof(WCHAR
)))
150 if (!testfiles
[i
].attr_done
) {
151 todo_wine_if (testfiles
[i
].todo
)
152 ok (attrib
== (testfiles
[i
].attr
& attribmask
), "file %s: expected %s (%x), got %x (is your linux new enough?)\n", testfiles
[i
].name
, testfiles
[i
].description
, testfiles
[i
].attr
, attrib
);
153 testfiles
[i
].attr_done
= TRUE
;
155 testfiles
[i
].nfound
++;
158 ok(testfiles
[i
].name
!= NULL
, "unexpected file found\n");
161 static void test_flags_NtQueryDirectoryFile(OBJECT_ATTRIBUTES
*attr
, const char *testdirA
,
162 UNICODE_STRING
*mask
,
163 BOOLEAN single_entry
, BOOLEAN restart_flag
)
167 UINT data_pos
, data_size
;
168 UINT data_len
; /* length of dir data */
169 BYTE data
[8192]; /* directory data */
170 FILE_BOTH_DIRECTORY_INFORMATION
*dir_info
;
177 data_size
= mask
? offsetof( FILE_BOTH_DIRECTORY_INFORMATION
, FileName
[256] ) : sizeof(data
);
179 /* Read the directory and note which files are found */
180 status
= pNtOpenFile( &dirh
, SYNCHRONIZE
| FILE_LIST_DIRECTORY
, attr
, &io
, FILE_SHARE_READ
,
181 FILE_SYNCHRONOUS_IO_NONALERT
|FILE_OPEN_FOR_BACKUP_INTENT
|FILE_DIRECTORY_FILE
);
182 ok (status
== STATUS_SUCCESS
, "failed to open dir '%s', ret 0x%x, error %d\n", testdirA
, status
, GetLastError());
183 if (status
!= STATUS_SUCCESS
) {
184 skip("can't test if we can't open the directory\n");
188 pNtQueryDirectoryFile( dirh
, NULL
, NULL
, NULL
, &io
, data
, data_size
,
189 FileBothDirectoryInformation
, single_entry
, mask
, restart_flag
);
190 ok (U(io
).Status
== STATUS_SUCCESS
, "failed to query directory; status %x\n", U(io
).Status
);
191 data_len
= io
.Information
;
192 ok (data_len
>= sizeof(FILE_BOTH_DIRECTORY_INFORMATION
), "not enough data in directory\n");
196 while ((data_pos
< data_len
) && (numfiles
< max_test_dir_size
)) {
197 dir_info
= (FILE_BOTH_DIRECTORY_INFORMATION
*)(data
+ data_pos
);
199 tally_test_file(dir_info
);
201 if (dir_info
->NextEntryOffset
== 0) {
202 pNtQueryDirectoryFile( dirh
, 0, NULL
, NULL
, &io
, data
, data_size
,
203 FileBothDirectoryInformation
, single_entry
, mask
, FALSE
);
204 if (U(io
).Status
== STATUS_NO_MORE_FILES
)
206 ok (U(io
).Status
== STATUS_SUCCESS
, "failed to query directory; status %x\n", U(io
).Status
);
207 data_len
= io
.Information
;
208 if (data_len
< sizeof(FILE_BOTH_DIRECTORY_INFORMATION
))
212 data_pos
+= dir_info
->NextEntryOffset
;
216 ok(numfiles
< max_test_dir_size
, "too many loops\n");
219 for (i
=0; testfiles
[i
].name
; i
++)
220 ok(testfiles
[i
].nfound
== (testfiles
[i
].nameW
== mask
->Buffer
),
221 "Wrong number %d of %s files found (single_entry=%d,mask=%s)\n",
222 testfiles
[i
].nfound
, testfiles
[i
].description
, single_entry
,
223 wine_dbgstr_wn(mask
->Buffer
, mask
->Length
/sizeof(WCHAR
) ));
225 for (i
=0; testfiles
[i
].name
; i
++)
226 ok(testfiles
[i
].nfound
== 1, "Wrong number %d of %s files found (single_entry=%d,restart=%d)\n",
227 testfiles
[i
].nfound
, testfiles
[i
].description
, single_entry
, restart_flag
);
231 static void test_NtQueryDirectoryFile(void)
233 OBJECT_ATTRIBUTES attr
;
234 UNICODE_STRING ntdirname
, mask
;
235 char testdirA
[MAX_PATH
];
236 WCHAR testdirW
[MAX_PATH
];
239 WCHAR short_name
[12];
242 FILE_BOTH_DIRECTORY_INFORMATION
*fbdi
= (FILE_BOTH_DIRECTORY_INFORMATION
*)data
;
246 /* Clean up from prior aborted run, if any, then set up test files */
247 ok(GetTempPathA(MAX_PATH
, testdirA
), "couldn't get temp dir\n");
248 strcat(testdirA
, "NtQueryDirectoryFile.tmp");
249 tear_down_attribute_test(testdirA
);
250 set_up_attribute_test(testdirA
);
252 pRtlMultiByteToUnicodeN(testdirW
, sizeof(testdirW
), NULL
, testdirA
, strlen(testdirA
)+1);
253 if (!pRtlDosPathNameToNtPathName_U(testdirW
, &ntdirname
, NULL
, NULL
))
255 ok(0, "RtlDosPathNametoNtPathName_U failed\n");
258 InitializeObjectAttributes(&attr
, &ntdirname
, OBJ_CASE_INSENSITIVE
, 0, NULL
);
260 test_flags_NtQueryDirectoryFile(&attr
, testdirA
, NULL
, FALSE
, TRUE
);
261 test_flags_NtQueryDirectoryFile(&attr
, testdirA
, NULL
, FALSE
, FALSE
);
262 test_flags_NtQueryDirectoryFile(&attr
, testdirA
, NULL
, TRUE
, TRUE
);
263 test_flags_NtQueryDirectoryFile(&attr
, testdirA
, NULL
, TRUE
, FALSE
);
265 for (i
= 0; testfiles
[i
].name
; i
++)
267 if (testfiles
[i
].nameW
[0] == '.') continue; /* . and .. as masks are broken on Windows */
268 mask
.Buffer
= testfiles
[i
].nameW
;
269 mask
.Length
= mask
.MaximumLength
= lstrlenW(testfiles
[i
].nameW
) * sizeof(WCHAR
);
270 test_flags_NtQueryDirectoryFile(&attr
, testdirA
, &mask
, FALSE
, TRUE
);
271 test_flags_NtQueryDirectoryFile(&attr
, testdirA
, &mask
, FALSE
, FALSE
);
272 test_flags_NtQueryDirectoryFile(&attr
, testdirA
, &mask
, TRUE
, TRUE
);
273 test_flags_NtQueryDirectoryFile(&attr
, testdirA
, &mask
, TRUE
, FALSE
);
276 /* short path passed as mask */
277 status
= pNtOpenFile(&dirh
, SYNCHRONIZE
| FILE_LIST_DIRECTORY
, &attr
, &io
, FILE_SHARE_READ
,
278 FILE_SYNCHRONOUS_IO_NONALERT
| FILE_OPEN_FOR_BACKUP_INTENT
| FILE_DIRECTORY_FILE
);
279 ok(status
== STATUS_SUCCESS
, "failed to open dir '%s'\n", testdirA
);
280 if (status
!= STATUS_SUCCESS
) {
281 skip("can't test if we can't open the directory\n");
284 mask
.Buffer
= testfiles
[0].nameW
;
285 mask
.Length
= mask
.MaximumLength
= lstrlenW(testfiles
[0].nameW
) * sizeof(WCHAR
);
286 data_size
= offsetof(FILE_BOTH_DIRECTORY_INFORMATION
, FileName
[256]);
287 pNtQueryDirectoryFile(dirh
, 0, NULL
, NULL
, &io
, data
, data_size
,
288 FileBothDirectoryInformation
, TRUE
, &mask
, FALSE
);
289 ok(U(io
).Status
== STATUS_SUCCESS
, "failed to query directory; status %x\n", U(io
).Status
);
290 ok(fbdi
->ShortName
[0], "ShortName is empty\n");
292 mask
.Length
= mask
.MaximumLength
= fbdi
->ShortNameLength
;
293 memcpy(short_name
, fbdi
->ShortName
, mask
.Length
);
294 mask
.Buffer
= short_name
;
295 pNtQueryDirectoryFile(dirh
, 0, NULL
, NULL
, &io
, data
, data_size
,
296 FileBothDirectoryInformation
, TRUE
, &mask
, TRUE
);
297 ok(U(io
).Status
== STATUS_SUCCESS
, "failed to query directory status %x\n", U(io
).Status
);
298 ok(fbdi
->FileNameLength
== strlen(testfiles
[0].name
)*sizeof(WCHAR
) &&
299 !memcmp(fbdi
->FileName
, testfiles
[0].nameW
, fbdi
->FileNameLength
),
300 "incorrect long file name: %s\n", wine_dbgstr_wn(fbdi
->FileName
,
301 fbdi
->FileNameLength
/sizeof(WCHAR
)));
306 tear_down_attribute_test(testdirA
);
307 pRtlFreeUnicodeString(&ntdirname
);
310 static void set_up_case_test(const char *testdir
)
316 ret
= CreateDirectoryA(testdir
, NULL
);
317 ok(ret
, "couldn't create dir '%s', error %d\n", testdir
, GetLastError());
319 sprintf(buf
, "%s\\%s", testdir
, "TesT");
320 h
= CreateFileA(buf
, GENERIC_READ
|GENERIC_WRITE
, 0, NULL
, CREATE_ALWAYS
,
321 FILE_ATTRIBUTE_NORMAL
, 0);
322 ok(h
!= INVALID_HANDLE_VALUE
, "failed to create temp file '%s'\n", buf
);
326 static void tear_down_case_test(const char *testdir
)
331 sprintf(buf
, "%s\\%s", testdir
, "TesT");
332 ret
= DeleteFileA(buf
);
333 ok(ret
|| (GetLastError() == ERROR_PATH_NOT_FOUND
),
334 "Failed to rm %s, error %d\n", buf
, GetLastError());
335 RemoveDirectoryA(testdir
);
338 static void test_NtQueryDirectoryFile_case(void)
340 static const char testfile
[] = "TesT";
341 static const WCHAR testfile_w
[] = {'T','e','s','T'};
342 static int testfile_len
= sizeof(testfile
) - 1;
343 static WCHAR testmask
[] = {'t','e','s','t'};
344 OBJECT_ATTRIBUTES attr
;
345 UNICODE_STRING ntdirname
;
346 char testdir
[MAX_PATH
];
347 WCHAR testdir_w
[MAX_PATH
];
351 UINT data_size
, data_len
;
353 FILE_BOTH_DIRECTORY_INFORMATION
*dir_info
= (FILE_BOTH_DIRECTORY_INFORMATION
*)data
;
358 /* Clean up from prior aborted run, if any, then set up test files */
359 ok(GetTempPathA(MAX_PATH
, testdir
), "couldn't get temp dir\n");
360 strcat(testdir
, "case.tmp");
361 tear_down_case_test(testdir
);
362 set_up_case_test(testdir
);
364 pRtlMultiByteToUnicodeN(testdir_w
, sizeof(testdir_w
), NULL
, testdir
, strlen(testdir
) + 1);
365 if (!pRtlDosPathNameToNtPathName_U(testdir_w
, &ntdirname
, NULL
, NULL
))
367 ok(0, "RtlDosPathNametoNtPathName_U failed\n");
370 InitializeObjectAttributes(&attr
, &ntdirname
, OBJ_CASE_INSENSITIVE
, 0, NULL
);
372 data_size
= offsetof(FILE_BOTH_DIRECTORY_INFORMATION
, FileName
[256]);
374 status
= pNtOpenFile(&dirh
, SYNCHRONIZE
| FILE_LIST_DIRECTORY
, &attr
, &io
, FILE_SHARE_READ
,
375 FILE_SYNCHRONOUS_IO_NONALERT
| FILE_OPEN_FOR_BACKUP_INTENT
| FILE_DIRECTORY_FILE
);
376 ok (status
== STATUS_SUCCESS
, "failed to open dir '%s', ret 0x%x, error %d\n", testdir
, status
, GetLastError());
377 if (status
!= STATUS_SUCCESS
)
379 skip("can't test if we can't open the directory\n");
383 mask
.Buffer
= testmask
;
384 mask
.Length
= mask
.MaximumLength
= sizeof(testmask
);
385 pNtQueryDirectoryFile(dirh
, NULL
, NULL
, NULL
, &io
, data
, data_size
,
386 FileBothDirectoryInformation
, TRUE
, &mask
, FALSE
);
387 ok(U(io
).Status
== STATUS_SUCCESS
, "failed to query directory; status %x\n", U(io
).Status
);
388 data_len
= io
.Information
;
389 ok(data_len
>= sizeof(FILE_BOTH_DIRECTORY_INFORMATION
), "not enough data in directory\n");
391 name
= dir_info
->FileName
;
392 name_len
= dir_info
->FileNameLength
/ sizeof(WCHAR
);
394 ok(name_len
== testfile_len
, "unexpected filename length %u\n", name_len
);
395 ok(!memcmp(name
, testfile_w
, testfile_len
* sizeof(WCHAR
)), "unexpected filename %s\n",
396 wine_dbgstr_wn(name
, name_len
));
401 tear_down_case_test(testdir
);
402 pRtlFreeUnicodeString(&ntdirname
);
405 static void test_redirection(void)
410 if (!pRtlWow64EnableFsRedirection
|| !pRtlWow64EnableFsRedirectionEx
)
412 skip( "Wow64 redirection not supported\n" );
415 status
= pRtlWow64EnableFsRedirectionEx( FALSE
, &old
);
416 if (status
== STATUS_NOT_IMPLEMENTED
)
418 skip( "Wow64 redirection not supported\n" );
421 ok( !status
, "RtlWow64EnableFsRedirectionEx failed status %x\n", status
);
423 status
= pRtlWow64EnableFsRedirectionEx( FALSE
, &cur
);
424 ok( !status
, "RtlWow64EnableFsRedirectionEx failed status %x\n", status
);
425 ok( !cur
, "RtlWow64EnableFsRedirectionEx got %u\n", cur
);
427 status
= pRtlWow64EnableFsRedirectionEx( TRUE
, &cur
);
428 ok( !status
, "RtlWow64EnableFsRedirectionEx failed status %x\n", status
);
429 status
= pRtlWow64EnableFsRedirectionEx( TRUE
, &cur
);
430 ok( !status
, "RtlWow64EnableFsRedirectionEx failed status %x\n", status
);
431 ok( cur
== 1, "RtlWow64EnableFsRedirectionEx got %u\n", cur
);
433 status
= pRtlWow64EnableFsRedirection( TRUE
);
434 ok( !status
, "RtlWow64EnableFsRedirectionEx failed status %x\n", status
);
435 status
= pRtlWow64EnableFsRedirectionEx( TRUE
, &cur
);
436 ok( !status
, "RtlWow64EnableFsRedirectionEx failed status %x\n", status
);
437 ok( !cur
, "RtlWow64EnableFsRedirectionEx got %u\n", cur
);
439 status
= pRtlWow64EnableFsRedirectionEx( TRUE
, NULL
);
440 ok( status
== STATUS_ACCESS_VIOLATION
, "RtlWow64EnableFsRedirectionEx failed with status %x\n", status
);
441 status
= pRtlWow64EnableFsRedirectionEx( TRUE
, (void*)1 );
442 ok( status
== STATUS_ACCESS_VIOLATION
, "RtlWow64EnableFsRedirectionEx failed with status %x\n", status
);
444 status
= pRtlWow64EnableFsRedirection( FALSE
);
445 ok( !status
, "RtlWow64EnableFsRedirectionEx failed status %x\n", status
);
446 status
= pRtlWow64EnableFsRedirectionEx( FALSE
, &cur
);
447 ok( !status
, "RtlWow64EnableFsRedirectionEx failed status %x\n", status
);
448 ok( cur
== 1, "RtlWow64EnableFsRedirectionEx got %u\n", cur
);
450 pRtlWow64EnableFsRedirectionEx( old
, &cur
);
453 START_TEST(directory
)
455 HMODULE hntdll
= GetModuleHandleA("ntdll.dll");
458 skip("not running on NT, skipping test\n");
462 pNtClose
= (void *)GetProcAddress(hntdll
, "NtClose");
463 pNtOpenFile
= (void *)GetProcAddress(hntdll
, "NtOpenFile");
464 pNtQueryDirectoryFile
= (void *)GetProcAddress(hntdll
, "NtQueryDirectoryFile");
465 pRtlCreateUnicodeStringFromAsciiz
= (void *)GetProcAddress(hntdll
, "RtlCreateUnicodeStringFromAsciiz");
466 pRtlDosPathNameToNtPathName_U
= (void *)GetProcAddress(hntdll
, "RtlDosPathNameToNtPathName_U");
467 pRtlInitUnicodeString
= (void *)GetProcAddress(hntdll
, "RtlInitUnicodeString");
468 pRtlFreeUnicodeString
= (void *)GetProcAddress(hntdll
, "RtlFreeUnicodeString");
469 pRtlMultiByteToUnicodeN
= (void *)GetProcAddress(hntdll
,"RtlMultiByteToUnicodeN");
470 pRtlWow64EnableFsRedirection
= (void *)GetProcAddress(hntdll
,"RtlWow64EnableFsRedirection");
471 pRtlWow64EnableFsRedirectionEx
= (void *)GetProcAddress(hntdll
,"RtlWow64EnableFsRedirectionEx");
473 test_NtQueryDirectoryFile();
474 test_NtQueryDirectoryFile_case();