26#define WIN32_NO_STATUS
35#define HAS_TRAIL_SLASH_A(string) (string[lstrlenA(string)-1]=='\\')
37#define LONGFILE "Long File test.path"
38#define SHORTFILE "pathtest.pth"
39#define SHORTDIR "shortdir"
40#define LONGDIR "Long Directory"
41#define NONFILE_SHORT "noexist.pth"
42#define NONFILE_LONG "NonExistent File"
43#define NONDIR_SHORT "notadir"
44#define NONDIR_LONG "NonExistent Directory"
46#define NOT_A_VALID_DRIVE '@'
50#elif defined __aarch64__ || defined__arm64ec__
52#elif defined __x86_64__
127 "%s: GetShortPathNameA failed\n",
errstr);
130 "%s: GetShortPathNameA should not have a trailing \\\n",
errstr);
137 sprintf(fullpath,
"%s\\%s",curdir,subpath);
138 sprintf(fullpathshort,
"%s\\%s",curdirshort,subpath);
139 sprintf(fullpathlong,
"%s\\%s",curdirlong,subpath);
142 ok(
len,
"GetFullPathNameA failed for: '%s'\n",subpath);
145 "%s: GetFullPathNameA should not return a filename ptr\n",
errstr);
147 "%s: GetFullPathNameA returned '%s' instead of '%s'\n",
151 "%s: GetFullPathNameA returned '%s' instead of '%s'\n",
154 "%s: GetFullPathNameA returned '%s' instead of '%s'\n",
174 ok(
len,
"%s: GetLongPathNameA failed during Short->Long conversion\n",
errstr);
175 ok(!
lstrcmpiA(fullpathlong, tmpstr),
"%s: GetLongPathNameA returned '%s' instead of '%s'\n",
errstr,
176 tmpstr, fullpathlong);
190 ok(!
lstrcmpiA(fullpathlong, tmpstr),
"%s: GetLongPathNameA returned '%s' instead of '%s'\n",
191 errstr, tmpstr, fullpathlong);
209 for(
i=
len-1;(
i>=0) && (!done);
i--) {
212 else if(
path[
i]==
'\\') {
222 ok(!
error,
"Illegal file found in 8.3 path '%s'\n",
path);
234 "GetShortPathNAmeA did not return an 8.3 path\n");
244 "GetShortPathNameA returned '%s' instead of '%s'\n",
dir,goodstr);
246 "GetShortPathNameA returned '%s' with incorrect extension\n",three);
268 "%s: GetShortPathNameA error: len=%ld error=%ld tmpstr=[%s]\n",
273 "%s: GetShortPathA should have failed len=%ld, error=%ld\n",
277 ok(!passfail.
longlen,
"GetLongPathNameA passed when it shouldn't have\n");
286 "%s: GetLongPathA unexpected error %ld.\n",
errstr, passfail.
longerror);
301 dirptr=(cmprstr==
NULL) ? newdir : cmprstr;
303 ok(
val,
"%s: SetCurrentDirectoryA failed\n",
errstr);
305 "%s: SetCurrentDirectory did not change the directory, though it passed\n",
308 "%s: SetCurrentDirectory did not change the directory, though it passed\n",
311 "%s: Couldn't set directory to its original value\n",
errstr);
316 "%s: SetCurrentDirectoryA passed when it should have failed\n",
errstr);
318 "%s: SetCurrentDirectory changed the directory, though it failed\n",
321 "%s: SetCurrentDirectory changed the directory, though it failed\n",
342 *curDrive = tmpstr[0];
344 trace(
"Unable to discover current drive, some tests will not be conducted.\n");
350 "GetTempPathA returned a path that did not end in '\\'\n");
353 ok(len1==
len+1,
"GetTempPathA should return string length %ld instead of %ld\n",
len+1,len1);
357 sprintf(tmpstr,
"pat%.4x.tmp",
id & 0xffff);
358 sprintf(tmpstr1,
"pat%x.tmp",
id & 0xffff);
361 "GetTempFileNameA returned '%s' which doesn't match '%s' or '%s'. id=%x\n",
362 newdir,tmpstr,tmpstr1,
id);
363 ok(
DeleteFileA(newdir),
"Couldn't delete the temporary file we just created\n");
366 sprintf(tmpstr,
"%.4x.tmp",
id & 0xffff);
367 sprintf(tmpstr1,
"%x.tmp",
id & 0xffff);
370 "GetTempFileNameA returned '%s' which doesn't match '%s' or '%s'. id=%x\n",
371 newdir,tmpstr,tmpstr1,
id);
372 ok(
DeleteFileA(newdir),
"Couldn't delete the temporary file we just created\n");
376 sprintf(invalid_dir,
"%s\\%s",tmppath,
"non_existent_dir_1jwj3y32nb3");
392 drives &= ~(1<<(*curDrive-
'A'));
394 for( *otherDrive=
'A'; (drives & 1) == 0; drives>>=1, (*otherDrive)++);
396 trace(
"Could not find alternative drive, some tests will not be conducted.\n");
405 "CreateDirectoryA succeeded even though a file of the same name exists\n");
406 ok(
DeleteFileA(newdir),
"Couldn't delete the temporary file we just created\n");
415 sprintf(tmpstr,
"%c:", *curDrive);
419 "CreateDirectoryA(\"%s\" should have failed (%ld)\n", tmpstr,
GetLastError());
420 sprintf(tmpstr,
"%c:\\", *curDrive);
424 "CreateDirectoryA(\"%s\" should have failed (%ld)\n", tmpstr,
GetLastError());
463 ok(len1==
len+1,
"GetCurrentDirectoryA returned %ld instead of %ld\n",len1,
len+1);
465 "GetCurrentDirectoryA should not have modified the buffer\n");
538 sprintf(tmpstr,
"%c:", newdir[0]);
541 sprintf(tmpstr,
"%c:\\", newdir[0]);
603 "GetShortPathNameA failed\n");
605 "GetShortPathNameA should not have a trailing \\\n");
609 "GetShortPathNameA failed\n");
611 "GetShortPathNameA should not have a trailing \\\n");
617 "GetLongPathNameA: wrong return code, %ld instead of %d\n",
622 ok(!
strcmp(
dir,tmpstr),
"GetLongPathNameA: returned '%s' instead of '%s' (rc=%ld)\n",
630 "GetShortPathNameA returned '%s' instead of '%s'\n",tmpstr,tmpstr1);
639 "GetShortPathNameA returned '%s' instead of '%s'\n",tmpstr,tmpstr1);
652 "GetShortPathNameA error: len=%ld error=%ld tmpstr=[%s]\n",
655 ok(!passfail.
longlen,
"GetLongPathNameA passed when it shouldn't have\n");
660 ok(passfail.
shortlen==0,
"GetShortPathNameA passed when it shouldn't have\n");
664 "GetShortPathA should have returned 'ERROR_FILE_NOT_FOUND'\n");
665 ok(!passfail.
longlen,
"GetLongPathNameA passed when it shouldn't have\n");
677 "GetShortPathNameA error: len=%ld error=%ld tmpstr=[%s]\n",
679 ok(!passfail.
longlen,
"GetLongPathNameA passed when it shouldn't have\n");
684 ok(passfail.
shortlen==0,
"GetShortPathNameA passed when it shouldn't have\n");
688 "GetShortPathA should have returned 'ERROR_FILE_NOT_FOUND'\n");
689 ok(!passfail.
longlen,
"GetLongPathNameA passed when it shouldn't have\n");
700 "GetShortPathNameA error: len=%ld error=%ld tmpstr=[%s]\n",
702 ok(!passfail.
longlen,
"GetLongPathNameA passed when it shouldn't have\n");
704 "Unexpected error %ld.\n", passfail.
longerror);
708 ok(passfail.
shortlen==0,
"GetShortPathNameA passed when it shouldn't have\n");
712 "GetShortPathA returned %ld and not 'ERROR_PATH_NOT_FOUND'\n",
714 ok(!passfail.
longlen,
"GetLongPathNameA passed when it shouldn't have\n");
716 "Unexpected error %ld.\n", passfail.
longerror);
720 ok(passfail.
shortlen==0,
"GetShortPathNameA passed when it shouldn't have\n");
724 "GetShortPathA returned %ld and not 'ERROR_PATH_NOT_FOUND'\n",
726 ok(!passfail.
longlen,
"GetLongPathNameA passed when it shouldn't have\n");
728 "Unexpected error %ld.\n", passfail.
longerror);
732 ok(passfail.
shortlen==0,
"GetShortPathNameA passed when it shouldn't have\n");
736 "GetShortPathA returned %ld and not 'ERROR_PATH_NOT_FOUND'\n",
738 ok(!passfail.
longlen,
"GetLongPathNameA passed when it shouldn't have\n");
740 "Unexpected error %ld.\n", passfail.
longerror);
751 sprintf(tmpstr2,
"%s\\%s",curdir_short,tmpstr);
756 "GetShortPathNameA error: len=%ld error=%ld tmpstr=[%s]\n",
758 ok(!passfail.
longlen,
"GetLongPathNameA passed when it shouldn't have\n");
763 ok(passfail.
shortlen==0,
"GetShortPathNameA passed when it shouldn't have\n");
767 "GetShortPathA returned %ld and not 'ERROR_FILE_NOT_FOUND'\n",
769 ok(!passfail.
longlen,
"GetLongPathNameA passed when it shouldn't have\n");
774 sprintf(tmpstr,
"%c:",curdir[0]);
776 "GetFullPathNameA(%c:) failed\n", curdir[0]);
778 sprintf(tmpstr1,
"%s\\",tmpstr);
780 "GetFullPathNameA(%c:) returned '%s' instead of '%s' or '%s'\n",
781 curdir[0],tmpstr2,tmpstr,tmpstr1);
786 "GetFullPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
788 "GetFullPathNameA returned part '%s' instead of '%s'\n",strptr,
SHORTFILE);
795 "GetFullPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
797 "GetFullPathNameA returned part '%s' instead of '%s'\n",strptr,
SHORTFILE);
805 "GetFullPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
807 "GetFullPathNameA returned part '%s' instead of '%s'\n",strptr,
SHORTFILE);
816 "GetFullPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
818 "GetFullPathNameA returned part '%s' instead of '%s'\n",strptr,
SHORTFILE);
826 "GetLongPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
830 "GetLongPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
834 "GetLongPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
839 "GetLongPathNameA returned '%s' instead of '%s/%s'\n",tmpstr1,
SHORTDIR,
SHORTFILE);
844 "GetShortPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
851 "GetFullPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
853 "GetFullPathNameA returned part '%s' instead of '%s'\n",strptr,
SHORTFILE);
859 "GetFullPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
862 "GetFullPathNameA returned part '%s' instead of '%s'\n",strptr,
SHORTFILE);
874 "GetShortPathNameA did not keep relative directory [%s]\n",tmpstr1);
876 ok(!
lstrcmpiA(tmpstr1, tmpstr),
"GetLongPathNameA returned '%s' instead of '%s'\n", tmpstr1, tmpstr);
913 "GetShortPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
917 "GetShortPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
921 ok(!
lstrcmpiA(tmpstr,tmpstr1),
"GetLongPathNameA returned '%s' instead of '%s'\n", tmpstr1, tmpstr);
925 ok(!
lstrcmpiA(tmpstr,tmpstr1),
"GetLongPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
933 len_with_null =
strlen(tmp_dir) + 1;
939 ok(
len ==
strlen(
buf),
"returned length should be equal to the length of string\n");
949 ok(
len >= len_with_null,
"Expected >= %lu, got %lu\n", len_with_null,
len);
952 ok(
len >= len_with_null,
"Expected >= %lu, got %lu\n", len_with_null,
len);
960 ok(
len ==
strlen(
buf),
"returned length should be equal to the length of string\n");
965 ok(
len ==
strlen(
buf),
"returned length should be equal to the length of string\n");
975 "expected %ld, got %ld\n", slen,
len);
985 static const WCHAR fooW[] = {
'f',
'o',
'o',0};
988 len_with_null =
lstrlenW(tmp_dirW) + 1;
1001 ok(
lstrcmpiW(
buf, tmp_dirW) == 0,
"GetTempPathW returned an incorrect temporary path\n");
1002 ok(
len ==
lstrlenW(
buf),
"returned length should be equal to the length of string\n");
1006 ok(
buf[0] == 0,
"unicode version should truncate the buffer to zero size\n");
1007 ok(
len >= len_with_null,
"Expected >= %lu, got %lu\n", len_with_null,
len);
1010 ok(
len >= len_with_null,
"Expected >= %lu, got %lu\n", len_with_null,
len);
1014 ok(
lstrcmpiW(
buf, tmp_dirW) == 0,
"GetTempPathW returned an incorrect temporary path\n");
1015 ok(
len ==
lstrlenW(
buf),
"returned length should be equal to the length of string\n");
1020 ok(
lstrcmpiW(
buf, tmp_dirW) == 0,
"GetTempPathW returned an incorrect temporary path\n");
1021 ok(
len ==
lstrlenW(
buf),
"returned length should be equal to the length of string\n");
1032 "expected %ld, got %ld\n", slen,
len);
1058 skip(
"Could not allocate memory for the test\n");
1062 long_buf[
len] = 0xCC;
1064 ok(
lstrcmpiW(long_buf, tmp_dirW) == 0,
"GetTempPathW returned an incorrect temporary path\n");
1065 ok(
len ==
lstrlenW(long_buf),
"returned length should be equal to the length of string\n");
1071 for(;
len < 32767;
len++)
1072 ok(long_buf[
len] ==
'\0',
"expected NULL at [%ld], got 0x%x\n",
len, long_buf[
len]);
1076 ok(long_buf[
len] == 0xcc,
"expected 0xcc at [%ld], got 0x%x\n",
len, long_buf[
len]);
1091 trace(
"TMP=%s\n", save_TMP);
1152 ok(!
length,
"GetLongPathNameA should fail\n");
1165 ok(temppath[0] == 0,
"Buffer should not have been touched\n");
1177 ok(
length == explength,
"Wrong length %ld, expected %ld\n",
length, explength);
1180 ok(
length == explength,
"Wrong length %ld, expected %ld\n",
length, explength);
1183 ok(
length == explength,
"Wrong length %ld, expected %ld\n",
length, explength);
1184 ok(temppath[0] == 0,
"Buffer should not have been touched\n");
1188 hostsize =
sizeof(unc_prefix) - 2;
1196 unc_short[
lstrlenA(unc_short)] = temppath[0];
1204 longpath[
lstrlenA(longpath)] = temppath[0];
1214 win_skip(
"UNC with computername is not supported\n");
1218 explength =
lstrlenA(longpath) + 1;
1220 ok(
length == explength,
"Wrong length %ld, expected %ld\n",
length, explength);
1224 ok(
length == explength,
"Wrong length %ld, expected %ld\n",
length, explength);
1230 ok(
length == explength,
"Wrong length %ld, expected %ld\n",
length, explength);
1231 ok(unc_long[0] == 0,
"Buffer should not have been touched\n");
1239 ok(
length == explength,
"Wrong length %ld, expected %ld\n",
length, explength);
1240 ok(!
lstrcmpiA(unc_long, longpath),
"Expected (%s), got (%s)\n", longpath, unc_long);
1255 static const WCHAR prefix[] = {
'\\',
'\\',
'?',
'\\', 0};
1256 static const WCHAR backslash[] = {
'\\', 0};
1257 static const WCHAR letterX[] = {
'X', 0};
1261 ok(0==
length,
"GetLongPathNameW returned %ld but expected 0\n",
length);
1267 ok(0==
length,
"GetLongPathNameW returned %ld but expected 0\n",
length);
1297 "Expected ERROR_PATH_NOT_FOUND, got %ld\n",
GetLastError());
1305 "Expected ERROR_PATH_NOT_FOUND, got %ld\n",
GetLastError());
1311 "Could not create the temporary file : %ld.\n",
GetLastError());
1328 ok(
length == expanded,
"Expected %ld, got %ld\n", expanded,
length);
1340 static const WCHAR extended_prefix[] = {
'\\',
'\\',
'?',
'\\',0};
1341 static const WCHAR test_path[] = {
'L',
'o',
'n',
'g',
'D',
'i',
'r',
'e',
'c',
't',
'o',
'r',
'y',
'N',
'a',
'm',
'e', 0 };
1342 static const WCHAR name[] = {
't',
'e',
's',
't', 0 };
1343 static const WCHAR backSlash[] = {
'\\', 0 };
1344 static const WCHAR a_bcdeW[] = {
'a',
'.',
'b',
'c',
'd',
'e',0};
1345 static const WCHAR wildW[] = {
'*',0 };
1369 ok(
length,
"GetShortPathNameW returned 0.\n" );
1375 ok(
length,
"GetShortPathNameW returned 0.\n" );
1384 ok(!
length,
"GetShortPathNameW should fail\n");
1391 ok(
ret,
"Cannot delete file.\n" );
1405 ok(!
length,
"GetShortPathNameW should fail\n");
1410 ok(
ret,
"Cannot delete file.\n" );
1415 ok(
ret,
"Cannot delete directory.\n" );
1437 ok(
res ==
total,
"returned %lu with %lu (expected '%lu')\n",
1447 "returned %ld with %ld and '%s' (expected '%ld' and a string)\n",
1455 "returned %ld with %ld and '%s' (expected '%ld' and a string)\n",
1463 ok(
res ==
total,
"returned %ld with %ld and '%s' (expected '%ld')\n",
1471 ok(
res ==
total,
"returned %ld with %ld and '%s' (expected '%ld')\n",
1493 ok(
res ==
total,
"returned %lu with %lu (expected '%lu')\n",
1503 "returned %ld with %ld and '%s' (expected '%ld' and a string)\n",
1511 "returned %ld with %ld and '%s' (expected '%ld' and a string)\n",
1519 ok(
res ==
total,
"returned %ld with %ld and '%s' (expected '%ld')\n",
1527 ok(
res ==
total,
"returned %ld with %ld and '%s' (expected '%ld')\n",
1533 if (!pNeedCurrentDirectoryForExePathA)
1535 win_skip(
"NeedCurrentDirectoryForExePathA is not available\n");
1541 pNeedCurrentDirectoryForExePathA(
NULL);
1544 ok(pNeedCurrentDirectoryForExePathA(
"."),
"returned FALSE for \".\"\n");
1545 ok(pNeedCurrentDirectoryForExePathA(
"c:\\"),
"returned FALSE for \"c:\\\"\n");
1546 ok(pNeedCurrentDirectoryForExePathA(
"cmd.exe"),
"returned FALSE for \"cmd.exe\"\n");
1549 ok(!pNeedCurrentDirectoryForExePathA(
"."),
"returned TRUE for \".\"\n");
1550 ok(pNeedCurrentDirectoryForExePathA(
"c:\\"),
"returned FALSE for \"c:\\\"\n");
1551 ok(!pNeedCurrentDirectoryForExePathA(
"cmd.exe"),
"returned TRUE for \"cmd.exe\"\n");
1556 const WCHAR thispath[] = {
'.', 0};
1557 const WCHAR fullpath[] = {
'c',
':',
'\\', 0};
1558 const WCHAR cmdname[] = {
'c',
'm',
'd',
'.',
'e',
'x',
'e', 0};
1560 if (!pNeedCurrentDirectoryForExePathW)
1562 win_skip(
"NeedCurrentDirectoryForExePathW is not available\n");
1568 pNeedCurrentDirectoryForExePathW(
NULL);
1571 ok(pNeedCurrentDirectoryForExePathW(thispath),
"returned FALSE for \".\"\n");
1572 ok(pNeedCurrentDirectoryForExePathW(fullpath),
"returned FALSE for \"c:\\\"\n");
1573 ok(pNeedCurrentDirectoryForExePathW(cmdname),
"returned FALSE for \"cmd.exe\"\n");
1576 ok(!pNeedCurrentDirectoryForExePathW(thispath),
"returned TRUE for \".\"\n");
1577 ok(pNeedCurrentDirectoryForExePathW(fullpath),
"returned FALSE for \"c:\\\"\n");
1578 ok(!pNeedCurrentDirectoryForExePathW(cmdname),
"returned TRUE for \"cmd.exe\"\n");
1590#define is_upper_case_letter(a) ((a) >= 'A' && (a) <= 'Z')
1596 ok(
ret <
sizeof(
buf),
"buffer should be %u bytes\n",
ret);
1597 ok(
buf[1] ==
':',
"expected buf[1] == ':' got %c\n",
buf[1]);
1605 ok(
ret <
sizeof(
buf),
"buffer should be %u bytes\n",
ret);
1606 ok(
buf[1] ==
':',
"expected buf[1] == ':' got %c\n",
buf[1]);
1613 ok(
ret <
sizeof(
buf),
"buffer should be %u bytes\n",
ret);
1614 ok(
buf[1] ==
':',
"expected buf[1] == ':' got %c\n",
buf[1]);
1621 ok(
ret <
sizeof(
buf),
"buffer should be %u bytes\n",
ret);
1622 ok(
buf[1] ==
':',
"expected buf[1] == ':' got %c\n",
buf[1]);
1630 ok(
ret <
sizeof(
buf),
"buffer should be %u bytes\n",
ret);
1633 ok(
buf[1] ==
':',
"expected buf[1] == ':' got %c\n",
buf[1]);
1634 ok(
buf[
strlen(
buf)-1] ==
'\\',
"Temporary path (%s) doesn't end in a slash\n",
buf);
1641 ok(
ret <
sizeof(
buf),
"buffer should be %u bytes\n",
ret);
1642 ok(
buf[1] ==
':',
"expected buf[1] == ':' got %c\n",
buf[1]);
1649 ok(
ret <
sizeof(
buf),
"buffer should be %u bytes\n",
ret);
1650 ok(
buf[1] ==
':',
"expected buf[1] == ':' got %c\n",
buf[1]);
1657 ok(
ret <
sizeof(
buf),
"buffer should be %u bytes\n",
ret);
1658 ok(
buf[1] ==
':',
"expected buf[1] == ':' got %c\n",
buf[1]);
1660#undef is_upper_case_letter
1664"<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">"
1665"<assemblyIdentity version=\"1.2.3.4\" name=\"testdep1\" type=\"win32\" processorArchitecture=\"" ARCH "\"/>"
1666" <file name=\"testdep.dll\" />"
1667" <file name=\"ole32\" />"
1668" <file name=\"kernel32.dll\" />"
1672"<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">"
1673"<assemblyIdentity version=\"1.2.3.4\" name=\"Wine.Test\" type=\"win32\" />"
1675" <dependentAssembly>"
1676" <assemblyIdentity type=\"win32\" name=\"testdep1\" version=\"1.2.3.4\" processorArchitecture=\"" ARCH "\" />"
1677" </dependentAssembly>"
1718 actctx.cbSize =
sizeof(ACTCTXW);
1727 ok(
actctx.wProcessorArchitecture == 0,
"wProcessorArchitecture=%d\n",
actctx.wProcessorArchitecture);
1729 ok(
actctx.lpAssemblyDirectory ==
NULL,
"lpAssemblyDirectory=%p\n",
actctx.lpAssemblyDirectory);
1731 ok(
actctx.lpApplicationName ==
NULL,
"lpApplicationName=%p\n",
actctx.lpApplicationName);
1739 static const CHAR testdepA[] =
"testdep.dll";
1740 static const CHAR testdeprelA[] =
"./testdep.dll";
1741 static const CHAR kernel32A[] =
"kernel32.dll";
1742 static const CHAR fileA[] =
"";
1755 ok(
ret == 0,
"Expected failure, got %ld\n",
ret);
1757 "Expected ERROR_INVALID_PARAMETER, got %lx\n",
GetLastError());
1762 ok(
ret == 0,
"Expected failure, got %ld\n",
ret);
1764 "Expected ERROR_INVALID_PARAMETER, got %lx\n",
GetLastError());
1768 strcat(path2A,
"testfile.ext.ext2");
1776 ok(!
ret,
"Unexpected return value %lu.\n",
ret);
1780 ok(!
ret,
"Unexpected return value %lu.\n",
ret);
1831 ok(
strcmp(buffA, path2A),
"got wrong path %s, %s\n", buffA, path2A);
1840 ok(
ret,
"failed to obtain working directory.\n");
1845 ok(bret != 0,
"failed to copy test executable to temp directory, %lu\n",
GetLastError());
1849 ok(bret != 0,
"failed to copy test executable to launch directory, %lu\n",
GetLastError());
1851 ok(bret,
"failed to change working directory\n");
1854 ok(
strcmp(buffA, path3A) == 0,
"expected %s, got %s\n", path3A, buffA);
1856 ok(bret,
"failed to reset working directory\n");
1863 static const WCHAR fileext2W[] = {
't',
'e',
's',
't',
'f',
'i',
'l',
'e',
'.',
'e',
'x',
't',
'.',
'e',
'x',
't',
'2',0};
1864 static const WCHAR fileextW[] = {
't',
'e',
's',
't',
'f',
'i',
'l',
'e',
'.',
'e',
'x',
't',0};
1865 static const WCHAR testdeprelW[] = {
'.',
'/',
't',
'e',
's',
't',
'd',
'e',
'p',
'.',
'd',
'l',
'l',0};
1866 static const WCHAR testdepW[] = {
't',
'e',
's',
't',
'd',
'e',
'p',
'.',
'd',
'l',
'l',0};
1867 static const WCHAR testdep1W[] = {
't',
'e',
's',
't',
'd',
'e',
'p',0};
1868 static const WCHAR kernel32dllW[] = {
'k',
'e',
'r',
'n',
'e',
'l',
'3',
'2',
'.',
'd',
'l',
'l',0};
1869 static const WCHAR kernel32W[] = {
'k',
'e',
'r',
'n',
'e',
'l',
'3',
'2',0};
1870 static const WCHAR ole32W[] = {
'o',
'l',
'e',
'3',
'2',0};
1871 static const WCHAR ext2W[] = {
'.',
'e',
'x',
't',
'2',0};
1872 static const WCHAR extW[] = {
'.',
'e',
'x',
't',0};
1873 static const WCHAR dllW[] = {
'.',
'd',
'l',
'l',0};
1885 ok(
ret == 0,
"Expected failure, got %ld\n",
ret);
1887 "Expected ERROR_INVALID_PARAMETER, got %#lx\n",
GetLastError());
1892 ok(
ret == 0,
"Expected failure, got %ld\n",
ret);
1894 "Expected ERROR_INVALID_PARAMETER, got %lx\n",
GetLastError());
1906 ok(!
ret,
"Unexpected return value %lu.\n",
ret);
1910 ok(!
ret,
"Unexpected return value %lu.\n",
ret);
1992 } invalid_parameters[] =
2007 strcpy(output,
"deadbeef");
2008 filepart = (
char *)0xdeadbeef;
2010 invalid_parameters[
i].
len,
2012 invalid_parameters[
i].lastpart);
2013 ok(!
ret,
"[%d] Expected GetFullPathNameA to return 0, got %lu\n",
i,
ret);
2014 ok(!
strcmp(output,
"deadbeef"),
"[%d] Expected the output buffer to be unchanged, got \"%s\"\n",
i, output);
2015 ok(filepart == (
char *)0xdeadbeef,
"[%d] Expected output file part pointer to be untouched, got %p\n",
i, filepart);
2018 "[%d] Expected GetLastError() to return 0xdeadbeef, got %lu\n",
2024 skip(
"Skipping DBCS(Japanese) GetFullPathNameA test in this codepage (%d)\n", acp);
2026 const struct dbcs_case {
2030 {
"c:\\a\\\x95\x5c\x97\xa0.txt",
"\x95\x5c\x97\xa0.txt" },
2031 {
"c:\\\x83\x8f\x83\x43\x83\x93\\wine.c",
"wine.c" },
2032 {
"c:\\demo\\\x97\xa0\x95\x5c",
"\x97\xa0\x95\x5c" }
2039 "[%d] expected %s got %s\n",
i, testset[
i].
expected, filepart);
2047 static const WCHAR deadbeefW[] = {
'd',
'e',
'a',
'd',
'b',
'e',
'e',
'f',0};
2060 } invalid_parameters[] =
2078 filepart = (
WCHAR *)0xdeadbeef;
2080 invalid_parameters[
i].
len,
2082 invalid_parameters[
i].lastpart);
2083 ok(!
ret,
"[%d] Expected GetFullPathNameW to return 0, got %lu\n",
i,
ret);
2084 ok(!
lstrcmpW(output, deadbeefW),
"[%d] Expected the output buffer to be unchanged, got %s\n",
i,
wine_dbgstr_w(output));
2085 ok(filepart == (
WCHAR *)0xdeadbeef ||
2086 (invalid_parameters[
i].win7_expect && filepart ==
NULL),
2087 "[%d] Expected output file part pointer to be untouched, got %p\n",
i, filepart);
2090 "[%d] Expected GetLastError() to return 0xdeadbeef, got %lu\n",
2099#define MAKEFUNC(f) (p##f = (void*)GetProcAddress(mod, #f))
2163 ok(!
strcmp(
buf,
"..\\foo\\file"),
"expected ..\\foo\\file, got %s\n",
buf);
2167 ok(!
strcmp(
buf,
"..\\foo\\file"),
"expected ..\\foo\\file, got %s\n",
buf);
2172 ok(!
strcmp(
buf,
".\\..\\foo\\file"),
"expected .\\..\\foo\\file, got %s\n",
buf);
2176 ok(!
strcmp(
buf,
".\\..\\foo\\file"),
"expected .\\..\\foo\\file, got %s\n",
buf);
2182 ok(!
strcmp(
buf,
"..\\\\foo\\file"),
"expected ..\\\\foo\\file, got %s\n",
buf);
2186 ok(!
strcmp(
buf,
"..\\\\foo\\file"),
"expected ..\\\\foo\\file, got %s\n",
buf);
2197 static const WCHAR has_driveW[] = {
'C',
':',
'\\',
'a',
'.',
't',
'x',
't',0};
2198 static const WCHAR has_pathW[] = {
'b',
'\\',
'a',
'.',
't',
'x',
't',0};
2199 static const WCHAR too_longW[] = {
'a',
'l',
'o',
'n',
'g',
'f',
'i',
'l',
'e',
'n',
'a',
'm',
'e',
'.',
't',
'x',
't',0};
2200 static const WCHAR twodotsW[] = {
't',
'e',
's',
't',
'.',
'e',
's',
't',
'.',
't',
'x',
't',0};
2201 static const WCHAR longextW[] = {
't',
'e',
's',
't',
'.',
't',
'x',
't',
't',
'x',
't',0};
2203 static const WCHAR funnycharsW[] = {
'!',
'#',
'$',
'%',
'&',
'\'',
'(',
')',
'.',
'-',
'@',
'^',0};
2204 static const WCHAR length8W[] = {
't',
'e',
's',
't',
't',
'e',
's',
't',
'.',
't',
'x',
't',0};
2205 static const WCHAR length1W[] = {
't',0};
2206 static const WCHAR withspaceW[] = {
't',
'e',
's',
't',
' ',
'e',
's',
't',
'.',
't',
'x',
't',0};
2208 static const struct {
2210 BOOL should_be_legal, has_space;
2224 BOOL br, is_legal, has_space;
2228 if(!pCheckNameLegalDOS8Dot3W){
2229 win_skip(
"Missing CheckNameLegalDOS8Dot3, skipping tests\n");
2233 br = pCheckNameLegalDOS8Dot3W(
NULL,
NULL, 0,
NULL, &is_legal);
2234 ok(br ==
FALSE,
"CheckNameLegalDOS8Dot3W should have failed\n");
2236 br = pCheckNameLegalDOS8Dot3A(
NULL,
NULL, 0,
NULL, &is_legal);
2237 ok(br ==
FALSE,
"CheckNameLegalDOS8Dot3A should have failed\n");
2239 br = pCheckNameLegalDOS8Dot3W(length8W,
NULL, 0,
NULL,
NULL);
2240 ok(br ==
FALSE,
"CheckNameLegalDOS8Dot3W should have failed\n");
2242 br = pCheckNameLegalDOS8Dot3A(
"testtest.txt",
NULL, 0,
NULL,
NULL);
2243 ok(br ==
FALSE,
"CheckNameLegalDOS8Dot3A should have failed\n");
2246 br = pCheckNameLegalDOS8Dot3W(cases[
i].
name,
NULL, 0, &has_space, &is_legal);
2248 ok(is_legal == cases[
i].should_be_legal,
"Got wrong legality for %s\n",
wine_dbgstr_w(cases[
i].
name));
2254 br = pCheckNameLegalDOS8Dot3A(astr,
NULL, 0, &has_space, &is_legal);
2255 ok(br ==
TRUE,
"CheckNameLegalDOS8Dot3W failed for %s\n", astr);
2256 ok(is_legal == cases[
i].should_be_legal,
"Got wrong legality for %s\n", astr);
2268 if (!pSetSearchPathMode)
2270 win_skip(
"SetSearchPathMode isn't available\n" );
2279 ok(
ret,
"failed to switch to %s\n",
dir );
2290 ret = pSetSearchPathMode( 0 );
2291 ok( !
ret,
"SetSearchPathMode succeeded\n" );
2295 ret = pSetSearchPathMode( 0x80 );
2296 ok( !
ret,
"SetSearchPathMode succeeded\n" );
2301 ok( !
ret,
"SetSearchPathMode succeeded\n" );
2335 ok( !
ret,
"SetSearchPathMode succeeded\n" );
2344 ok( !
ret,
"SetSearchPathMode succeeded\n" );
2349 ok( !
ret,
"SetSearchPathMode succeeded\n" );
2382 if (*dlldir) *
p++ =
';';
2398 if (!dlldir && safe)
2424 if (!pRtlGetSearchPath)
2426 win_skip(
"RtlGetSearchPath isn't available\n" );
2436 ret = pRtlGetSearchPath( &
path );
2437 ok( !
ret,
"RtlGetSearchPath failed %lx\n",
ret );
2439 pRtlReleasePath(
path );
2444 ret = pRtlGetSearchPath( &
path );
2445 ok( !
ret,
"RtlGetSearchPath failed %lx\n",
ret );
2447 pRtlReleasePath(
path );
2449 if (pSetDllDirectoryW)
2451 ok( pSetDllDirectoryW( dlldir ),
"SetDllDirectoryW failed\n" );
2454 ret = pRtlGetSearchPath( &
path );
2455 ok( !
ret,
"RtlGetSearchPath failed %lx\n",
ret );
2457 pRtlReleasePath(
path );
2458 pSetDllDirectoryW(
NULL );
2466 static const WCHAR fooW[] = {
'\\',
'f',
'o',
'o',0};
2472 if (!pRtlGetExePath)
2474 win_skip(
"RtlGetExePath isn't available\n" );
2486 ok( !
ret,
"RtlGetExePath failed %lx\n",
ret );
2488 pRtlReleasePath(
path );
2493 ok( !
ret,
"RtlGetExePath failed %lx\n",
ret );
2495 pRtlReleasePath(
path );
2502 ok( !
ret,
"RtlGetExePath failed %lx\n",
ret );
2504 pRtlReleasePath(
path );
2509 ok( !
ret,
"RtlGetExePath failed %lx\n",
ret );
2511 pRtlReleasePath(
path );
2517 ok( !
ret,
"RtlGetExePath failed %lx\n",
ret );
2519 pRtlReleasePath(
path );
2521 if (pSetDllDirectoryW)
2523 ok( pSetDllDirectoryW( dlldir ),
"SetDllDirectoryW failed\n" );
2527 ok( !
ret,
"RtlGetExePath failed %lx\n",
ret );
2529 pRtlReleasePath(
path );
2530 pSetDllDirectoryW(
NULL );
2538 static const WCHAR fooW[] = {
'f',
'o',
'o',0};
2543 if (!pLdrGetDllPath)
2545 win_skip(
"LdrGetDllPath isn't available\n" );
2554 path = unknown_ptr = (
WCHAR *)0xdeadbeef;
2555 ret = pLdrGetDllPath( 0, 0, &
path, &unknown_ptr );
2556 ok( !
ret,
"LdrGetDllPath failed %lx\n",
ret );
2557 ok( !unknown_ptr,
"unknown ptr %p\n", unknown_ptr );
2559 pRtlReleasePath(
path );
2563 ret = pLdrGetDllPath( 0, 0, &
path, &unknown_ptr );
2564 ok( !
ret,
"LdrGetDllPath failed %lx\n",
ret );
2565 ok( !unknown_ptr,
"unknown ptr %p\n", unknown_ptr );
2567 pRtlReleasePath(
path );
2569 if (pSetDllDirectoryW)
2571 ok( pSetDllDirectoryW( dlldir ),
"SetDllDirectoryW failed\n" );
2573 ret = pLdrGetDllPath( 0, 0, &
path, &unknown_ptr );
2574 ok( !
ret,
"LdrGetDllPath failed %lx\n",
ret );
2575 ok( !unknown_ptr,
"unknown ptr %p\n", unknown_ptr );
2577 pRtlReleasePath(
path );
2578 pSetDllDirectoryW(
NULL );
2582 ok( !
ret,
"LdrGetDllPath failed %lx\n",
ret );
2583 ok( !unknown_ptr,
"unknown ptr %p\n", unknown_ptr );
2586 pRtlReleasePath(
path );
2589 ok( !
ret,
"LdrGetDllPath failed %lx\n",
ret );
2590 ok( !unknown_ptr,
"unknown ptr %p\n", unknown_ptr );
2594 pRtlReleasePath(
path );
2605 ok( !
ret,
"LdrGetDllPath failed %lx\n",
ret );
2606 ok( !unknown_ptr,
"unknown ptr %p\n", unknown_ptr );
2609 pRtlReleasePath(
path );
2612 ok( !
ret,
"LdrGetDllPath failed %lx\n",
ret );
2613 ok( !unknown_ptr,
"unknown ptr %p\n", unknown_ptr );
2615 pRtlReleasePath(
path );
2618 ok( !
ret,
"LdrGetDllPath failed %lx\n",
ret );
2619 ok( !unknown_ptr,
"unknown ptr %p\n", unknown_ptr );
2622 pRtlReleasePath(
path );
2625 ok( !
ret,
"LdrGetDllPath failed %lx\n",
ret );
2626 ok( !unknown_ptr,
"unknown ptr %p\n", unknown_ptr );
2629 pRtlReleasePath(
path );
2632 ok( !
ret,
"LdrGetDllPath failed %lx\n",
ret );
2633 ok( !unknown_ptr,
"unknown ptr %p\n", unknown_ptr );
2636 pRtlReleasePath(
path );
2639 ok( !
ret,
"LdrGetDllPath failed %lx\n",
ret );
2640 ok( !unknown_ptr,
"unknown ptr %p\n", unknown_ptr );
2643 pRtlReleasePath(
path );
2646 ok( !
ret,
"LdrGetDllPath failed %lx\n",
ret );
2647 ok( !unknown_ptr,
"unknown ptr %p\n", unknown_ptr );
2650 pRtlReleasePath(
path );
2655 ok( !unknown_ptr,
"unknown ptr %p\n", unknown_ptr );
2662 ok( !
ret,
"LdrGetDllPath failed %lx\n",
ret );
2663 ok( !unknown_ptr,
"unknown ptr %p\n", unknown_ptr );
2665 pRtlReleasePath(
path );
2667 if (pAddDllDirectory)
2670 ok( !!
cookie,
"AddDllDirectory failed\n" );
2672 ok( !
ret,
"LdrGetDllPath failed %lx\n",
ret );
2673 ok( !unknown_ptr,
"unknown ptr %p\n", unknown_ptr );
2675 pRtlReleasePath(
path );
2676 pRemoveDllDirectory(
cookie );
2679 if (pSetDefaultDllDirectories)
2682 ret = pLdrGetDllPath( 0, 0, &
path, &unknown_ptr );
2683 ok( !
ret,
"LdrGetDllPath failed %lx\n",
ret );
2684 ok( !unknown_ptr,
"unknown ptr %p\n", unknown_ptr );
2687 pRtlReleasePath(
path );
2688 pSetDefaultDllDirectories( 0 );
std::map< E_MODULE, HMODULE > mod
static const WCHAR dllW[]
static const WCHAR empty[]
#define ERROR_INVALID_PARAMETER
#define GetCurrentDirectoryW(x, y)
#define GetEnvironmentVariableW(x, y, z)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define HeapFree(x, y, z)
#define FILE_ATTRIBUTE_NORMAL
#define WideCharToMultiByte
#define GetEnvironmentVariableA(x, y, z)
#define MultiByteToWideChar
#define ERROR_ACCESS_DENIED
#define ERROR_INVALID_NAME
static const WCHAR *const ext[]
static const WCHAR version[]
VOID WINAPI ReleaseActCtx(IN HANDLE hActCtx)
BOOL WINAPI DeactivateActCtx(IN DWORD dwFlags, IN ULONG_PTR ulCookie)
BOOL WINAPI ActivateActCtx(IN HANDLE hActCtx, OUT PULONG_PTR ulCookie)
BOOL WINAPI DECLSPEC_HOTPATCH SetEnvironmentVariableW(IN LPCWSTR lpName, IN LPCWSTR lpValue)
BOOL WINAPI DECLSPEC_HOTPATCH SetEnvironmentVariableA(IN LPCSTR lpName, IN LPCSTR lpValue)
BOOL WINAPI CopyFileA(IN LPCSTR lpExistingFileName, IN LPCSTR lpNewFileName, IN BOOL bFailIfExists)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
DWORD WINAPI GetShortPathNameA(IN LPCSTR lpszLongPath, OUT LPSTR lpszShortPath, IN DWORD cchBuffer)
DWORD WINAPI SearchPathA(IN LPCSTR lpPath OPTIONAL, IN LPCSTR lpFileName, IN LPCSTR lpExtension OPTIONAL, IN DWORD nBufferLength, OUT LPSTR lpBuffer, OUT LPSTR *lpFilePart OPTIONAL)
BOOL WINAPI SetDllDirectoryW(IN LPCWSTR lpPathName)
BOOL WINAPI NeedCurrentDirectoryForExePathA(IN LPCSTR ExeName)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
UINT WINAPI GetWindowsDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
DWORD WINAPI GetLongPathNameA(IN LPCSTR lpszShortPath, OUT LPSTR lpszLongPath, IN DWORD cchBuffer)
BOOL WINAPI SetCurrentDirectoryW(IN LPCWSTR lpPathName)
DWORD WINAPI SearchPathW(IN LPCWSTR lpPath OPTIONAL, IN LPCWSTR lpFileName, IN LPCWSTR lpExtension OPTIONAL, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart OPTIONAL)
DWORD WINAPI GetFullPathNameA(IN LPCSTR lpFileName, IN DWORD nBufferLength, OUT LPSTR lpBuffer, OUT LPSTR *lpFilePart)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
DWORD WINAPI GetLongPathNameW(IN LPCWSTR lpszShortPath, OUT LPWSTR lpszLongPath, IN DWORD cchBuffer)
DWORD WINAPI GetShortPathNameW(IN LPCWSTR lpszLongPath, OUT LPWSTR lpszShortPath, IN DWORD cchBuffer)
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
BOOL WINAPI NeedCurrentDirectoryForExePathW(IN LPCWSTR ExeName)
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
UINT WINAPI GetSystemDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
HANDLE WINAPI CreateActCtxW(PCACTCTXW pActCtx)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
DLL_DIRECTORY_COOKIE WINAPI DECLSPEC_HOTPATCH AddDllDirectory(const WCHAR *dir)
BOOL WINAPI DECLSPEC_HOTPATCH SetDefaultDllDirectories(DWORD flags)
BOOL WINAPI DECLSPEC_HOTPATCH RemoveDllDirectory(DLL_DIRECTORY_COOKIE cookie)
DWORD WINAPI GetVersion(void)
DWORD WINAPI DECLSPEC_HOTPATCH GetLogicalDrives(void)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP char *__cdecl strchr(const char *, int)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
_ACRTIMP char *__cdecl strrchr(const char *, int)
static const WCHAR fileW[]
BOOL WINAPI CheckNameLegalDOS8Dot3W(LPCWSTR lpName, LPSTR lpOemName OPTIONAL, DWORD OemNameSize OPTIONAL, PBOOL pbNameContainsSpaces OPTIONAL, PBOOL pbNameLegal)
UINT WINAPI GetTempFileNameA(IN LPCSTR lpPathName, IN LPCSTR lpPrefixString, IN UINT uUnique, OUT LPSTR lpTempFileName)
BOOL WINAPI CheckNameLegalDOS8Dot3A(LPCSTR lpName, LPSTR lpOemName OPTIONAL, DWORD OemNameSize OPTIONAL, PBOOL pbNameContainsSpaces OPTIONAL, PBOOL pbNameLegal)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
GLenum GLenum GLenum input
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
static const WCHAR emptyW[]
NTSYSAPI NTSTATUS WINAPI LdrGetDllPath(PCWSTR, ULONG, PWSTR *, PWSTR *)
NTSYSAPI NTSTATUS WINAPI RtlGetSearchPath(PWSTR *)
NTSYSAPI void WINAPI RtlReleasePath(PWSTR)
NTSYSAPI NTSTATUS WINAPI RtlGetExePath(PCWSTR, PWSTR *)
__cdecl __MINGW_NOTHROW char * dirname(char *)
void * DLL_DIRECTORY_COOKIE
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
#define ERROR_ALREADY_EXISTS
#define ERROR_FILE_NOT_FOUND
static char shortpath[MAX_PATH]
static void test_create(void)
#define expect(expected, got)
static WCHAR manifest_path[MAX_PATH]
static const WCHAR fooW[]
static const CHAR is_char_ok[]
static const CHAR funny_chars[]
static void test_PathNameA(CHAR *curdir, CHAR curDrive, CHAR otherDrive)
static const char manifest_dep[]
static void test_GetTempPathA(char *tmp_dir)
static void test_GetLongPathNameA(void)
static void test_GetFullPathNameA(void)
#define HAS_TRAIL_SLASH_A(string)
static void test_drive_letter_case(void)
static void test_GetSystemDirectory(void)
static void test_ShortPathCase(const char *tmpdir, const char *dirname, const char *filename)
static void test_GetWindowsDirectory(void)
static void test_setdir(CHAR *olddir, CHAR *newdir, CHAR *cmprstr, INT pass, const CHAR *errstr)
static void test_FunnyChars(CHAR *curdir, CHAR *curdir_short, CHAR *filename, INT valid, CHAR *errstr)
static void test_GetTempPathW(char *tmp_dir)
static void test_SetSearchPathMode(void)
static void create_manifest_file(const char *filename, const char *manifest)
static void test_relative_path(void)
static void test_GetTempPath(void)
static void test_SplitShortPathA(CHAR *path, CHAR *dir, CHAR *eight, CHAR *three)
static void test_RtlGetSearchPath(void)
static void delete_manifest_file(const char *filename)
static void test_CurrentDirectoryA(CHAR *origdir, CHAR *newdir)
static BOOL path_equal(const WCHAR *path1, const WCHAR *path2)
static void test_GetFullPathNameW(void)
static void test_LongtoShortA(CHAR *teststr, const CHAR *goodstr, const CHAR *ext, const CHAR *errstr)
static void test_GetLongPathNameW(void)
static void test_RtlGetExePath(void)
static void test_SearchPathA(void)
static const WCHAR pathW[]
static void test_LdrGetDllPath(void)
static void test_GetShortPathNameW(void)
static void test_SearchPathW(void)
#define is_upper_case_letter(a)
static void build_search_path(WCHAR *buffer, UINT size, const WCHAR *module, const WCHAR *dlldir, BOOL safe)
static void test_CleanupPathA(CHAR *origdir, CHAR *curdir)
static void init_pointers(void)
#define NOT_A_VALID_DRIVE
static void test_ValidPathA(const CHAR *curdir, const CHAR *subdir, const CHAR *filename, CHAR *shortstr, SLpassfail *passfail, const CHAR *errstr)
static void test_CheckNameLegalDOS8Dot3(void)
static void test_NeedCurrentDirectoryForExePathA(void)
static void test_NeedCurrentDirectoryForExePathW(void)
static void test_InitPathA(CHAR *newdir, CHAR *curDrive, CHAR *otherDrive)
static const char manifest_main[]
static const WCHAR path1[]
static const WCHAR path2[]
BOOL WINAPI SHIM_OBJ_NAME() GetComputerNameA(LPSTR lpBuffer, LPDWORD lpnSize)
static char tmpdir[MAX_PATH]
Character const *const prefix
#define STATUS_INVALID_PARAMETER
static const CHAR manifest[]
#define INVALID_FILE_ATTRIBUTES
const char * errstr(int errcode)
#define LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR
DWORD WINAPI GetLastError(void)
#define BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE
#define LOAD_LIBRARY_SEARCH_SYSTEM32
#define LOAD_WITH_ALTERED_SEARCH_PATH
#define BASE_SEARCH_PATH_PERMANENT
#define BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE
#define LOAD_LIBRARY_SEARCH_USER_DIRS
#define LOAD_LIBRARY_SEARCH_APPLICATION_DIR
#define ERROR_BAD_NETPATH
#define ERROR_PATH_NOT_FOUND