ReactOS  0.4.15-dev-1054-gd029a62
FindFiles.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: Tests for the Find*File*A/W APIs.
5  * PROGRAMMER: Hermès BÉLUSCA - MAÏTO
6  */
7 
8 #include "precomp.h"
9 #include <versionhelpers.h>
10 
11 /*
12  * NOTE: This test supposes the following requirements:
13  * - There is a disk attached to the letter "C:"
14  * - There is a Windows-like system installed in "C:<installation_directory>"
15  * which contains a sub-directory "system32"
16  * - There is no sub-directory called "foobar" in "C:\".
17  *
18  * If one of these requirements is not fulfilled, one or more tests may fail.
19  */
20 
21 static CHAR OSDirA[MAX_PATH]; // OS directory
23 static CHAR baseA[MAX_PATH]; // Current directory
25 static CHAR selfnameA[MAX_PATH]; // Path to this executable
27 static LPSTR exenameA; // Executable's name
29 static INT myARGC;
30 static LPSTR* myARGV;
31 
32 
33 /*
34  * Fixes definition of Wine's ok_err
35  */
36 #ifdef ok_err
37 #undef ok_err
38 #endif
39 
40 #define ok_err(error) \
41  ok_int(GetLastError(), error)
42 
43 
44 /*
45  * Types of tests. Define them as macros so that calling them
46  * into the code reports the actual line where they were called.
47  */
48 #define testType1_A(lpFileName, dwInitialError, hExpectedHandleValue, dwExpectedError, bExpectedNullFilename) \
49 do { \
50  ZeroMemory(&fd, sizeof(fd)); \
51  SetLastError((dwInitialError)); \
52  h = FindFirstFileA((lpFileName), &fd); \
53  ok(h == (hExpectedHandleValue), "FindFirstFileA returned 0x%p, expected 0x%p\n", h, (hExpectedHandleValue)); \
54  ok_err(dwExpectedError); \
55  if (bExpectedNullFilename) \
56  ok(fd.cFileName[0] == 0, "fd.cFileName != \"\"\n"); \
57  else \
58  ok(fd.cFileName[0] != 0, "fd.cFileName == \"\"\n"); \
59  FindClose(h); \
60 } while (0)
61 
62 #define testType1_W(lpFileName, dwInitialError, hExpectedHandleValue, dwExpectedError, bExpectedNullFilename) \
63 do { \
64  ZeroMemory(&fd, sizeof(fd)); \
65  SetLastError((dwInitialError)); \
66  h = FindFirstFileW((lpFileName), &fd); \
67  ok(h == (hExpectedHandleValue), "FindFirstFileW returned 0x%p, expected 0x%p\n", h, (hExpectedHandleValue)); \
68  ok_err(dwExpectedError); \
69  if (bExpectedNullFilename) \
70  ok(fd.cFileName[0] == 0, "fd.cFileName != \"\"\n"); \
71  else \
72  ok(fd.cFileName[0] != 0, "fd.cFileName == \"\"\n"); \
73  FindClose(h); \
74 } while (0)
75 
76 #define testType2_A(lpFileName, dwInitialError, hUnexpectedHandleValue, dwExpectedError) \
77 do { \
78  ZeroMemory(&fd, sizeof(fd)); \
79  SetLastError((dwInitialError)); \
80  h = FindFirstFileA((lpFileName), &fd); \
81  ok(h != (hUnexpectedHandleValue), "FindFirstFileA returned 0x%p\n", h); \
82  ok_err(dwExpectedError); \
83  ok(fd.cFileName[0] != 0, "fd.cFileName == \"\"\n"); \
84  FindClose(h); \
85 } while (0)
86 
87 #define testType2_W(lpFileName, dwInitialError, hUnexpectedHandleValue, dwExpectedError) \
88 do { \
89  ZeroMemory(&fd, sizeof(fd)); \
90  SetLastError((dwInitialError)); \
91  h = FindFirstFileW((lpFileName), &fd); \
92  ok(h != (hUnexpectedHandleValue), "FindFirstFileW returned 0x%p\n", h); \
93  ok_err(dwExpectedError); \
94  ok(fd.cFileName[0] != 0, "fd.cFileName == \"\"\n"); \
95  FindClose(h); \
96 } while (0)
97 
98 
99 static void Test_FindFirstFileA(void)
100 {
104  HANDLE h;
105 
106  /* Save the current directory */
108 
109 /*** Tests for the root directory - root directory ***/
110  /* Modify the current directory */
111  SetCurrentDirectoryA("C:\\");
112 
114 
117  testType2_A("C:\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
118 
121  testType2_A("\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
122 
123  /* Restore the old current directory */
125 /*****************************************************/
126 
127 /*** Tests for the root directory - long directory ***/
128  /* Modify the current directory */
129  SetCurrentDirectoryA(OSDirA); /* We expect here that OSDir is of the form: C:\OSDir */
130 
131  testType2_A("C:", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
132 
135  testType2_A("C:\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
136 
139  testType2_A("\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
140 
141  /* Restore the old current directory */
143 /*****************************************************/
144 
145 /*** Relative paths ***/
146  /*
147  * NOTE: This test does not give the same results if you launch the app
148  * from a root drive or from a long-form directory (of the form C:\dir).
149  */
150  // testType2_A("..", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
151  // testType1_A("..", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_FILE_NOT_FOUND, TRUE);
152 /**********************/
153 
154 /*** Relative paths - root directory ***/
155  /* Modify the current directory */
156  SetCurrentDirectoryA("C:\\");
157 
161  testType2_A(".\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
162 
166  testType2_A("..\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
167 
168  /* Restore the old current directory */
170 /***************************************/
171 
172 /*** Relative paths - long directory ***/
173  /* Modify the current directory */
174  SetCurrentDirectoryA(OSDirA); /* We expect here that OSDir is of the form: C:\OSDir */
175 
176  testType2_A(".", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
177 
180  testType2_A(".\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
181 
183 
186  testType2_A("..\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
187 
188  /* Restore the old current directory */
190 /****************************************/
191 
192 /*** Unexisting path ***/
193  testType1_A("C:\\foobar", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_FILE_NOT_FOUND, TRUE);
194  testType1_A("C:\\foobar\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
195  testType1_A("C:\\foobar\\\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
196  testType1_A("C:\\foobar\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
197  testType1_A("C:\\foobar\\system32\\..\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
198 
199  /* Possibly a DOS device */
200  testType1_A("C:\\foobar\\nul", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
201  testType1_A("C:\\foobar\\nul\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
202  testType1_A("C:\\foobar\\nul\\\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
203  testType1_A("C:\\foobar\\nul\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
204 
205  testType1_A("C:\\foobar\\toto", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
206  testType1_A("C:\\foobar\\toto\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
207  testType1_A("C:\\foobar\\toto\\\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
208  testType1_A("C:\\foobar\\toto\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
209 
210  strcpy(Buffer, "C:\\foobar\\");
213 
214  strcpy(Buffer, "C:\\foobar\\.\\");
217 /***********************/
218 
219 /*** Existing path ***/
220  strcpy(Buffer, OSDirA);
221  testType2_A(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
222 
223  strcpy(Buffer, OSDirA);
224  strcat(Buffer, "\\");
226 
227  strcpy(Buffer, OSDirA);
228  strcat(Buffer, "\\\\");
230 
231  strcpy(Buffer, OSDirA);
232  strcat(Buffer, "\\*");
233  testType2_A(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
234 
235  strcpy(Buffer, OSDirA);
236  strcat(Buffer, "\\.\\*");
237  testType2_A(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
238 
239  strcpy(Buffer, OSDirA);
240  strcat(Buffer, "\\system32\\..\\*");
241  testType2_A(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
242 
243  /* Possibly a DOS device */
244  strcpy(Buffer, OSDirA);
245  strcat(Buffer, "\\nul");
246  testType1_A(Buffer, 0xdeadbeef, (HANDLE)0x00000001, 0xdeadbeef, FALSE);
247 
248  strcpy(Buffer, OSDirA);
249  strcat(Buffer, "\\nul\\");
251 
252  strcpy(Buffer, OSDirA);
253  strcat(Buffer, "\\nul\\\\");
255 
256  strcpy(Buffer, OSDirA);
257  strcat(Buffer, "\\nul\\*");
259 
260  strcpy(Buffer, OSDirA);
261  strcat(Buffer, "\\toto");
263 
264  strcpy(Buffer, OSDirA);
265  strcat(Buffer, "\\toto\\");
267 
268  strcpy(Buffer, OSDirA);
269  strcat(Buffer, "\\toto\\\\");
271 
272  strcpy(Buffer, OSDirA);
273  strcat(Buffer, "\\toto\\*");
275 
276  // strcpy(Buffer, baseA);
277  // strcat(Buffer, "\\");
278  // strcat(Buffer, exenameA);
279  // testType2_A(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
280 
281  // strcpy(Buffer, baseA);
282  // strcat(Buffer, "\\.\\");
283  // strcat(Buffer, exenameA);
284  // testType2_A(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
285 /*********************/
286 
287  return;
288 }
289 
290 static void Test_FindFirstFileW(void)
291 {
295  HANDLE h;
296 
297  /* Save the current directory */
299 
300 /*** Tests for the root directory - root directory ***/
301  /* Modify the current directory */
302  SetCurrentDirectoryW(L"C:\\");
303 
305 
308  testType2_W(L"C:\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
309 
312  testType2_W(L"\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
313 
314  /* Restore the old current directory */
316 /*****************************************************/
317 
318 /*** Tests for the root directory - long directory ***/
319  /* Modify the current directory */
320  SetCurrentDirectoryW(OSDirW); /* We expect here that OSDir is of the form: C:\OSDir */
321 
322  testType2_W(L"C:", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
323 
326  testType2_W(L"C:\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
327 
330  testType2_W(L"\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
331 
332  /* Restore the old current directory */
334 /*****************************************************/
335 
336 /*** Relative paths ***/
337  /*
338  * NOTE: This test does not give the same results if you launch the app
339  * from a root drive or from a long-form directory (of the form C:\dir).
340  */
341  // testType2_W(L"..", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
342  // testType1_W(L"..", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_FILE_NOT_FOUND, TRUE);
343 /**********************/
344 
345 /*** Relative paths - root directory ***/
346  /* Modify the current directory */
347  SetCurrentDirectoryW(L"C:\\");
348 
352  testType2_W(L".\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
353 
357  testType2_W(L"..\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
358 
359  /* Restore the old current directory */
361 /***************************************/
362 
363 /*** Relative paths - long directory ***/
364  /* Modify the current directory */
365  SetCurrentDirectoryW(OSDirW); /* We expect here that OSDir is of the form: C:\OSDir */
366 
367  testType2_W(L".", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
368 
371  testType2_W(L".\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
372 
374 
377  testType2_W(L"..\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
378 
379  /* Restore the old current directory */
381 /****************************************/
382 
383 /*** Unexisting path ***/
384  testType1_W(L"C:\\foobar", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_FILE_NOT_FOUND, TRUE);
385  testType1_W(L"C:\\foobar\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
386  testType1_W(L"C:\\foobar\\\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
387  testType1_W(L"C:\\foobar\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
388  testType1_W(L"C:\\foobar\\system32\\..\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
389 
390  /* Possibly a DOS device */
391  testType1_W(L"C:\\foobar\\nul", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
392  testType1_W(L"C:\\foobar\\nul\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
393  testType1_W(L"C:\\foobar\\nul\\\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
394  testType1_W(L"C:\\foobar\\nul\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
395 
396  testType1_W(L"C:\\foobar\\toto", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
397  testType1_W(L"C:\\foobar\\toto\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
398  testType1_W(L"C:\\foobar\\toto\\\\", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
399  testType1_W(L"C:\\foobar\\toto\\*", 0xdeadbeef, INVALID_HANDLE_VALUE, ERROR_PATH_NOT_FOUND, TRUE);
400 
401  wcscpy(Buffer, L"C:\\foobar\\");
404 
405  wcscpy(Buffer, L"C:\\foobar\\.\\");
408 /***********************/
409 
410 /*** Existing path ***/
411  wcscpy(Buffer, OSDirW);
412  testType2_W(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
413 
414  wcscpy(Buffer, OSDirW);
415  wcscat(Buffer, L"\\");
417 
418  wcscpy(Buffer, OSDirW);
419  wcscat(Buffer, L"\\\\");
421 
422  wcscpy(Buffer, OSDirW);
423  wcscat(Buffer, L"\\*");
424  testType2_W(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
425 
426  wcscpy(Buffer, OSDirW);
427  wcscat(Buffer, L"\\.\\*");
428  testType2_W(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
429 
430  wcscpy(Buffer, OSDirW);
431  wcscat(Buffer, L"\\system32\\..\\*");
432  testType2_W(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
433 
434  /* Possibly a DOS device */
435  wcscpy(Buffer, OSDirW);
436  wcscat(Buffer, L"\\nul");
437  testType1_W(Buffer, 0xdeadbeef, (HANDLE)0x00000001, 0xdeadbeef, FALSE);
438 
439  wcscpy(Buffer, OSDirW);
440  wcscat(Buffer, L"\\nul\\");
442 
443  wcscpy(Buffer, OSDirW);
444  wcscat(Buffer, L"\\nul\\\\");
446 
447  wcscpy(Buffer, OSDirW);
448  wcscat(Buffer, L"\\nul\\*");
450 
451  wcscpy(Buffer, OSDirW);
452  wcscat(Buffer, L"\\toto");
454 
455  wcscpy(Buffer, OSDirW);
456  wcscat(Buffer, L"\\toto\\");
458 
459  wcscpy(Buffer, OSDirW);
460  wcscat(Buffer, L"\\toto\\\\");
462 
463  wcscpy(Buffer, OSDirW);
464  wcscat(Buffer, L"\\toto\\*");
466 
467  // wcscpy(Buffer, baseW);
468  // wcscat(Buffer, L"\\");
469  // wcscat(Buffer, exenameW);
470  // testType2_W(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
471 
472  // wcscpy(Buffer, baseW);
473  // wcscat(Buffer, L"\\.\\");
474  // wcscat(Buffer, exenameW);
475  // testType2_W(Buffer, 0xdeadbeef, INVALID_HANDLE_VALUE, 0xdeadbeef);
476 /*********************/
477 
478  return;
479 }
480 
481 
482 static int init(void)
483 {
484  LPSTR p;
485  size_t i;
486 
488  if (!GetCurrentDirectoryA(sizeof(baseA)/sizeof(baseA[0]), baseA)) return 0;
489  strcpy(selfnameA, myARGV[0]);
490 
491  /* Strip the path of selfname */
492  if ((p = strrchr(selfnameA, '\\')) != NULL)
493  exenameA = p + 1;
494  else
496 
497  if ((p = strrchr(exenameA, '/')) != NULL)
498  exenameA = p + 1;
499 
500  if (!GetWindowsDirectoryA(OSDirA, sizeof(OSDirA)/sizeof(OSDirA[0]))) return 0;
501 
502  /* Quick-and-dirty conversion ANSI --> UNICODE without the Win32 APIs */
503  for (i = 0 ; i <= strlen(baseA) ; ++i)
504  {
505  baseW[i] = (WCHAR)baseA[i];
506  }
507  for (i = 0 ; i <= strlen(selfnameA) ; ++i)
508  {
509  selfnameW[i] = (WCHAR)selfnameA[i];
510  }
512  for (i = 0 ; i <= strlen(OSDirA) ; ++i)
513  {
514  OSDirW[i] = (WCHAR)OSDirA[i];
515  }
516 
517  return 1;
518 }
519 
520 START_TEST(FindFiles)
521 {
522  int b = init();
523  ok(b, "Basic init of FindFiles test\n");
524  if (!b) return;
525 
528 }
static WCHAR selfnameW[MAX_PATH]
Definition: FindFiles.c:26
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
WCHAR CurrentDirectory[1024]
Definition: chkdsk.c:74
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define TRUE
Definition: types.h:120
char CHAR
Definition: xmlstorage.h:175
static int init(void)
Definition: FindFiles.c:482
#define GetCurrentDirectoryW(x, y)
Definition: compat.h:504
#define INVALID_HANDLE_VALUE
Definition: compat.h:479
static int fd
Definition: io.c:51
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
static WCHAR OSDirW[MAX_PATH]
Definition: FindFiles.c:22
char * LPSTR
Definition: xmlstorage.h:182
int32_t INT
Definition: typedefs.h:58
START_TEST(FindFiles)
Definition: FindFiles.c:520
#define ERROR_BAD_NETPATH
Definition: winerror.h:145
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
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
#define FALSE
Definition: types.h:117
static CHAR selfnameA[MAX_PATH]
Definition: FindFiles.c:25
#define testType2_W(lpFileName, dwInitialError, hUnexpectedHandleValue, dwExpectedError)
Definition: FindFiles.c:87
smooth NULL
Definition: ftsmooth.c:416
static INT myARGC
Definition: FindFiles.c:29
Definition: bufpool.h:45
static LPWSTR exenameW
Definition: FindFiles.c:28
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
static LPSTR exenameA
Definition: FindFiles.c:27
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:34
static void Test_FindFirstFileA(void)
Definition: FindFiles.c:99
int winetest_get_mainargs(char ***pargv)
#define testType2_A(lpFileName, dwInitialError, hUnexpectedHandleValue, dwExpectedError)
Definition: FindFiles.c:76
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static const WCHAR L[]
Definition: oid.c:1250
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
Definition: path.c:2205
static void Test_FindFirstFileW(void)
Definition: FindFiles.c:290
BOOL WINAPI SetCurrentDirectoryW(IN LPCWSTR lpPathName)
Definition: path.c:2248
#define ok(value,...)
Definition: atltest.h:57
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
Definition: path.c:2145
UINT WINAPI GetWindowsDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
Definition: path.c:2336
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define testType1_W(lpFileName, dwInitialError, hExpectedHandleValue, dwExpectedError, bExpectedNullFilename)
Definition: FindFiles.c:62
VERSIONHELPERAPI IsWindows7OrGreater()
static LPSTR * myARGV
Definition: FindFiles.c:30
#define testType1_A(lpFileName, dwInitialError, hExpectedHandleValue, dwExpectedError, bExpectedNullFilename)
Definition: FindFiles.c:48
static WCHAR baseW[MAX_PATH]
Definition: FindFiles.c:24
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
static CHAR baseA[MAX_PATH]
Definition: FindFiles.c:23
#define ERROR_INVALID_NAME
Definition: compat.h:103
#define ERROR_PATH_NOT_FOUND
Definition: winerror.h:106
GLfloat GLfloat p
Definition: glext.h:8902
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static CHAR OSDirA[MAX_PATH]
Definition: FindFiles.c:21