34 #define WIN32_NO_STATUS 65 { 0,
FILE_ATTRIBUTE_NORMAL, {
'l',
'o',
'n',
'g',
'f',
'i',
'l',
'e',
'n',
'a',
'm',
'e',
'.',
't',
'm',
'p'},
"normal" },
180 UINT data_pos, data_size;
189 pRtlInitUnicodeString( &dummy_mask,
dummyW );
198 skip(
"can't test if we can't open the directory\n");
202 U(
io).Status = 0xdeadbeef;
207 data_len =
io.Information;
222 U(
io).Status = 0xdeadbeef;
228 data_len =
io.Information;
242 "Wrong number %d of %s files found (single_entry=%d,mask=%s)\n",
247 ok(
testfiles[
i].nfound == 1,
"Wrong number %d of %s files found (single_entry=%d,restart=%d)\n",
266 if (!pRtlDosPathNameToNtPathName_U( testdir, &ntdirname,
NULL,
NULL ))
268 ok(0,
"RtlDosPathNametoNtPathName_U failed\n");
276 U(
io).Status = 0xdeadbeef;
281 data_len =
io.Information;
286 while (data_pos < data_len)
303 pRtlInitUnicodeString( &prev_str, prev );
304 pRtlInitUnicodeString( &name_str,
name );
305 res = pRtlCompareUnicodeString( &prev_str, &name_str,
TRUE );
312 if (
info->NextEntryOffset == 0)
314 U(
io).Status = 0xdeadbeef;
320 data_len =
io.Information;
323 else data_pos +=
info->NextEntryOffset;
327 pRtlFreeUnicodeString( &ntdirname );
340 U(
io).Status = 0xdeadbeef;
341 U(
io).Information = 0xdeadbeef;
349 ok(
data[0] == 0x55555555,
"%u: wrong offset %x\n",
class,
data[0] );
371 "%u: wrong status %x\n",
class,
status );
375 for (data_size = 1; data_size <
sizeof(
data); data_size++)
383 ok(
data[0] == 0,
"%u: wrong offset %x\n",
class,
data[0] );
389 ok(
data[0] == 0x55555555,
"%u: wrong offset %x\n",
class,
data[0] );
399 "%u: wrong size %u\n",
class, data_size );
404 "%u: wrong size %u\n",
class, data_size );
409 "%u: wrong size %u\n",
class, data_size );
414 "%u: wrong size %u\n",
class, data_size );
419 "%u: wrong size %u\n",
class, data_size );
424 "%u: wrong size %u\n",
class, data_size );
429 "%u: wrong size %u\n",
class, data_size );
467 strcat(testdirA,
"NtQueryDirectoryFile.tmp");
468 pRtlMultiByteToUnicodeN(testdirW,
sizeof(testdirW),
NULL, testdirA,
strlen(testdirA)+1);
472 if (!pRtlDosPathNameToNtPathName_U(testdirW, &ntdirname,
NULL,
NULL))
474 ok(0,
"RtlDosPathNametoNtPathName_U failed\n");
500 skip(
"can't test if we can't open the directory\n");
520 U(
io).Status = 0xdeadbeef;
535 U(
io).Status = 0xdeadbeef;
536 U(
io).Information = 0xdeadbeef;
555 U(
io).Status = 0xdeadbeef;
556 U(
io).Information = 0xdeadbeef;
569 ok(
filename[1] == 0x5555,
"incorrect long file name: %s\n",
576 U(
io).Status = 0xdeadbeef;
585 "incorrect long file name: %s\n",
595 data_size =
sizeof(
data);
596 U(
io).Status = 0xdeadbeef;
597 U(
io).Information = 0xdeadbeef;
606 ok( fbdi->
FileName[0] ==
'.',
"incorrect long file name: %s\n",
610 "wrong offset %x\n",
next->NextEntryOffset );
611 ok(
next->FileNameLength == 2 *
sizeof(
WCHAR),
"wrong length %x\n",
next->FileNameLength );
618 U(
io).Status = 0xdeadbeef;
619 U(
io).Information = 0xdeadbeef;
628 ok( fbdi->
FileName[0] ==
'.',
"incorrect long file name: %s\n",
631 ok(
next->NextEntryOffset == 0x55555555,
"wrong offset %x\n",
next->NextEntryOffset );
635 U(
io).Status = 0xdeadbeef;
636 U(
io).Information = 0xdeadbeef;
648 U(
io).Status = 0xdeadbeef;
649 U(
io).Information = 0xdeadbeef;
658 ok( fbdi->
FileName[0] ==
'.',
"incorrect long file name: %s\n",
661 ok(
next->NextEntryOffset == 0,
"wrong offset %x\n",
next->NextEntryOffset );
662 ok(
next->FileNameLength == 2 *
sizeof(
WCHAR),
"wrong length %x\n",
next->FileNameLength );
670 U(
io).Status = 0xdeadbeef;
671 U(
io).Information = 0xdeadbeef;
679 "wrong offset %x\n",
names->NextEntryOffset );
680 ok(
names->FileNameLength ==
sizeof(
WCHAR),
"wrong length %x\n",
names->FileNameLength );
681 ok(
names->FileName[0] ==
'.',
"incorrect long file name: %s\n",
684 ok(
names->NextEntryOffset == 0,
"wrong offset %x\n",
names->NextEntryOffset );
685 ok(
names->FileNameLength == 2 *
sizeof(
WCHAR),
"wrong length %x\n",
names->FileNameLength );
698 U(
io).Status = 0xdeadbeef;
699 data_size =
sizeof(
data);
705 U(
io).Status = 0xdeadbeef;
711 U(
io).Status = 0xdeadbeef;
719 U(
io).Status = 0xdeadbeef;
728 pRtlFreeUnicodeString(&ntdirname);
761 static const char testfile[] =
"TesT";
762 static const WCHAR testfile_w[] = {
'T',
'e',
's',
'T'};
763 static int testfile_len =
sizeof(testfile) - 1;
764 static WCHAR testmask[] = {
't',
'e',
's',
't'};
772 UINT data_size, data_len;
781 strcat(testdir,
"case.tmp");
785 pRtlMultiByteToUnicodeN(testdir_w,
sizeof(testdir_w),
NULL, testdir,
strlen(testdir) + 1);
786 if (!pRtlDosPathNameToNtPathName_U(testdir_w, &ntdirname,
NULL,
NULL))
788 ok(0,
"RtlDosPathNametoNtPathName_U failed\n");
800 skip(
"can't test if we can't open the directory\n");
804 mask.Buffer = testmask;
805 mask.Length =
mask.MaximumLength =
sizeof(testmask);
809 data_len =
io.Information;
815 ok(name_len == testfile_len,
"unexpected filename length %u\n", name_len);
816 ok(!
memcmp(
name, testfile_w, testfile_len *
sizeof(
WCHAR)),
"unexpected filename %s\n",
823 pRtlFreeUnicodeString(&ntdirname);
831 if (!pRtlWow64EnableFsRedirection || !pRtlWow64EnableFsRedirectionEx)
833 skip(
"Wow64 redirection not supported\n" );
836 status = pRtlWow64EnableFsRedirectionEx(
FALSE, &old );
839 skip(
"Wow64 redirection not supported\n" );
842 ok( !
status,
"RtlWow64EnableFsRedirectionEx failed status %x\n",
status );
845 ok( !
status,
"RtlWow64EnableFsRedirectionEx failed status %x\n",
status );
846 ok( !
cur,
"RtlWow64EnableFsRedirectionEx got %u\n",
cur );
849 ok( !
status,
"RtlWow64EnableFsRedirectionEx failed status %x\n",
status );
851 ok( !
status,
"RtlWow64EnableFsRedirectionEx failed status %x\n",
status );
852 ok(
cur == 1,
"RtlWow64EnableFsRedirectionEx got %u\n",
cur );
854 status = pRtlWow64EnableFsRedirection(
TRUE );
855 ok( !
status,
"RtlWow64EnableFsRedirectionEx failed status %x\n",
status );
857 ok( !
status,
"RtlWow64EnableFsRedirectionEx failed status %x\n",
status );
858 ok( !
cur,
"RtlWow64EnableFsRedirectionEx got %u\n",
cur );
862 status = pRtlWow64EnableFsRedirectionEx(
TRUE, (
void*)1 );
864 status = pRtlWow64EnableFsRedirectionEx(
TRUE, (
void*)0xDEADBEEF );
868 ok( !
status,
"RtlWow64EnableFsRedirectionEx failed status %x\n",
status );
870 ok( !
status,
"RtlWow64EnableFsRedirectionEx failed status %x\n",
status );
871 ok(
cur == 1,
"RtlWow64EnableFsRedirectionEx got %u\n",
cur );
873 pRtlWow64EnableFsRedirectionEx( old, &
cur );
882 skip(
"not running on NT, skipping test\n");
891 pRtlCreateUnicodeStringFromAsciiz = (
void *)
GetProcAddress(
hntdll,
"RtlCreateUnicodeStringFromAsciiz");
898 pRtlWow64EnableFsRedirectionEx = (
void *)
GetProcAddress(
hntdll,
"RtlWow64EnableFsRedirectionEx");
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define STATUS_INFO_LENGTH_MISMATCH
#define OBJ_CASE_INSENSITIVE
char * strcat(char *DstString, const char *SrcString)
ACPI_SIZE strlen(const char *String)
#define FILE_ATTRIBUTE_SYSTEM
char * wine_dbgstr_w(const wchar_t *wstr)
#define FILE_DIRECTORY_FILE
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
GLuint GLuint GLsizei count
static void test_flags_NtQueryDirectoryFile(OBJECT_ATTRIBUTES *attr, const char *testdirA, UNICODE_STRING *mask, BOOLEAN single_entry, BOOLEAN restart_flag)
#define INVALID_HANDLE_VALUE
static NTSTATUS(WINAPI *pNtClose)(PHANDLE)
DWORD WINAPI GetLastError(VOID)
static const int max_test_dir_size
static DWORD LPDWORD LPCSTR src
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
#define STATUS_INVALID_HANDLE
GLfloat GLfloat GLfloat GLfloat h
#define sprintf(buf, format,...)
GLenum GLuint GLenum GLsizei const GLchar * buf
return STATUS_NOT_IMPLEMENTED
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED LPLOOKUPSERVICE_COMPLETION_ROUTINE HANDLE * handle
#define DUPLICATE_SAME_ACCESS
static void test_NtQueryDirectoryFile_classes(HANDLE handle, UNICODE_STRING *mask)
static struct _test_info info[]
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
static void tally_test_file(FILE_BOTH_DIRECTORY_INFORMATION *dir_info)
#define offsetof(TYPE, MEMBER)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
#define FILE_ATTRIBUTE_REPARSE_POINT
#define FILE_ATTRIBUTE_DIRECTORY
static const WCHAR nameW[]
#define FILE_LIST_DIRECTORY
static void test_NtQueryDirectoryFile(void)
#define STATUS_NO_MORE_FILES
static DWORD LPDWORD LPCSTR DWORD srclen
static void tear_down_case_test(const char *testdir)
static void set_up_case_test(const char *testdir)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
static void test_directory_sort(const WCHAR *testdir)
#define FILE_ATTRIBUTE_NORMAL
static const int test_dir_count
#define STATUS_INVALID_INFO_CLASS
static FILE_INFORMATION_CLASS
#define memcpy(s1, s2, n)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
#define GetCurrentProcess()
const char * wine_dbgstr_wn(const WCHAR *str, int n)
static void tear_down_attribute_test(const WCHAR *testdir)
static const WCHAR dummyW[]
static const WCHAR backslashW[]
static void test_redirection(void)
static unsigned __int64 next
#define STATUS_BUFFER_OVERFLOW
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
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
static struct testfile_s testfiles[]
#define STATUS_ACCESS_VIOLATION
static void set_up_attribute_test(const WCHAR *testdir)
static POBJECT_ATTRIBUTES
#define STATUS_NO_SUCH_FILE
#define FILE_OPEN_FOR_BACKUP_INTENT
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
#define FILE_ATTRIBUTE_HIDDEN
static void test_NtQueryDirectoryFile_case(void)
static PWSTR CURDIR *static LPCWSTR
#define FILE_SYNCHRONOUS_IO_NONALERT
static DWORD LPDWORD reslen
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
static const WCHAR dotdotW[]
#define InitializeObjectAttributes(p, n, a, r, s)
#define GetProcAddress(x, y)
#define ERROR_PATH_NOT_FOUND
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
#define CreateFileA(a, b, c, d, e, f, g)
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK io
static BOOL(WINAPI *pRtlDosPathNameToNtPathName_U)(LPCWSTR
static SERVICE_STATUS status
static const WCHAR dotW[]
static void reset_found_files(void)
BOOL WINAPI DuplicateHandle(IN HANDLE hSourceProcessHandle, IN HANDLE hSourceHandle, IN HANDLE hTargetProcessHandle, OUT LPHANDLE lpTargetHandle, IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwOptions)
static PWSTR CURDIR *static VOID(WINAPI *pRtlInitUnicodeString)(PUNICODE_STRING
GLuint const GLchar * name