69 static char encoded[2*1024+1];
75 if (
len >=
sizeof(encoded)/2)
89 if (
c >=
'0' &&
c <=
'9')
return c -
'0';
90 if (
c >=
'a' &&
c <=
'f')
return c -
'a' + 10;
97 static char decoded[1024];
103 if (
len >=
sizeof(decoded))
133 if (
buf[0] ==
'\0' || (
buf[0] ==
'-' &&
buf[1] ==
'\0'))
return NULL;
146#define CHILD_DDE_TIMEOUT 2500
154 HSZ hsz1, HSZ hsz2, HDDEDATA hData,
160 trace(
"dde_cb: %04x, %04x, %p, %p, %p, %p, %08lx, %08lx\n",
161 uType, uFmt, hConv, hsz1, hsz2, hData, dwData1, dwData2);
171 return (HDDEDATA)
TRUE;
173 return (HDDEDATA)
FALSE;
203 trace(
"childTimeout called\n");
221 childPrintf(
hFile,
"[Child]\r\n");
228 childPrintf(
hFile,
"argcA=%d\r\n",
argc);
251 if (shared_block[0] !=
'\0' || shared_block[1] !=
'\0')
264 ok(hszApplication !=
NULL,
"DdeCreateStringHandleA(%s) = NULL\n", shared_block);
265 shared_block +=
strlen(shared_block) + 1;
267 ok(
hszTopic !=
NULL,
"DdeCreateStringHandleA(%s) = NULL\n", shared_block);
280 trace(
"msg %d lParam=%ld wParam=%lu\n",
msg.message,
msg.lParam,
msg.wParam);
361#define okShell_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : _okShell
362#define okShell okShell_(__FILE__, __LINE__)
383#define okChildString(key, expected) okChildString_(__FILE__, __LINE__, (key), (expected), (expected))
384#define okChildStringBroken(key, expected, broken) okChildString_(__FILE__, __LINE__, (key), (expected), (broken))
388 if (!
s1 && !
s2)
return 0;
399 if ((*
s1==
'/' || *
s1==
'\\') && (*
s2==
'/' || *
s2==
'\\'))
401 while (*
s1==
'/' || *
s1==
'\\')
403 while (*
s2==
'/' || *
s2==
'\\')
426 int equal, shortequal;
439 if (0 < rc && rc <
sizeof(altpath))
444 if (0 < rc && rc <
sizeof(altpath))
451#define okChildPath(key, expected) okChildPath_(__FILE__, __LINE__, (key), (expected))
460#define okChildInt(key, expected) okChildInt_(__FILE__, __LINE__, (key), (expected))
469#define okChildIntBroken(key, expected) okChildIntBroken_(__FILE__, __LINE__, (key), (expected))
492#define todo_wait for (_todo_wait = 1; _todo_wait; _todo_wait = 0)
534 win_skip(
"Skipping shellexecute of file with unassociated extension\n");
541 "WaitForSingleObject returned %d\n", wait_rc);
564 "Got different return value with empty string: %lu %lu\n", rc, rcEmpty);
569#define shell_execute(verb, filename, parameters, directory) \
570 shell_execute_(__FILE__, __LINE__, verb, filename, parameters, directory)
619 "rc=%d and hInstApp=%ld is not allowed\n",
629 "WaitForSingleObject(hProcess) returned %d\n",
640 "WaitForSingleObject returned %d\n", wait_rc);
644 "returned a process handle %p\n", sei.
hProcess);
674#define shell_execute_ex(mask, verb, filename, parameters, directory, class) \
675 shell_execute_ex_(__FILE__, __LINE__, mask, verb, filename, parameters, directory, class)
686 HKEY hkey, hkey_shell;
693 "could not create class %s (rc=%d)\n",
class, rc);
700 ok(rc ==
ERROR_SUCCESS,
"RegSetValueEx '%s' failed, expected ERROR_SUCCESS, got %d\n",
class, rc);
705 ok(rc ==
ERROR_SUCCESS,
"RegCreateKeyEx 'shell' failed, expected ERROR_SUCCESS, got %d\n", rc);
718 sprintf(
class,
"shlexec%s", extension);
722 "could not create association %s (rc=%d)\n",
class, rc);
727 ok(rc==
ERROR_SUCCESS,
"RegSetValueEx '%s' failed, expected ERROR_SUCCESS, got %d\n",
class, rc);
737 DWORD dwMaxSubkeyLen, dwMaxValueLen;
755 dwMaxLen =
max(dwMaxSubkeyLen, dwMaxValueLen);
793 if (lpszName != szNameBuf)
815 int rawcmd,
const char* cmdtail,
const char *ddeexec,
816 const char *application,
const char *
topic,
819 HKEY hkey_shell, hkey_verb, hkey_cmd;
842 ok(rc ==
ERROR_SUCCESS,
"%s verb key creation failed with %d\n", verb, rc);
846 ok(rc ==
ERROR_SUCCESS,
"\'command\' key creation failed with %d\n", rc);
863 HKEY hkey_ddeexec, hkey_application, hkey_topic, hkey_ifexec;
867 ok(rc ==
ERROR_SUCCESS,
"\'ddeexec\' key creation failed with %d\n", rc);
876 ok(rc ==
ERROR_SUCCESS,
"\'application\' key creation failed with %d\n", rc);
887 ok(rc ==
ERROR_SUCCESS,
"\'topic\' key creation failed with %d\n", rc);
897 ok(rc ==
ERROR_SUCCESS,
"\'ifexec\' key creation failed with %d\n", rc);
916 int rawcmd,
const char* cmdtail)
945 tmplongpath[1] =
':';
954 if (!lp || tmplongpath[lp-1] !=
'\\')
957 tmplongpath[lp++] =
'\\';
965 if (
sp == 0 &&
p[0] ==
'.' && (
p[1] ==
'/' ||
p[1] ==
'\\'))
967 tmplongpath[lp++] = *
p++;
968 tmplongpath[lp++] = *
p++;
970 for (; *
p && *
p !=
'/' && *
p !=
'\\';
p++);
978 strcpy(tmplongpath + lp, wfd.cFileName);
979 lp +=
strlen(tmplongpath + lp);
984 (tmplongpath[lp - 1] !=
'/' && tmplongpath[lp - 1] !=
'\\'))
988 tmplen =
strlen(tmplongpath) + 1;
989 if (tmplen <= longlen)
991 strcpy(longpath, tmplongpath);
1007 "%s\\test file.shlexec",
1008 "%s\\%%nasty%% $file.shlexec",
1009 "%s\\test file.noassoc",
1010 "%s\\test file.noassoc.shlexec",
1011 "%s\\test file.shlexec.noassoc",
1012 "%s\\test_shortcut_shlexec.lnk",
1013 "%s\\test_shortcut_exe.lnk",
1014 "%s\\test file.shl",
1015 "%s\\test file.shlfoo",
1016 "%s\\test file.sha",
1017 "%s\\test file.sfe",
1018 "%s\\test file.shlproto",
1019 "%s\\masked file.shlexec",
1021 "%s\\test file.sde",
1022 "%s\\test file.exe",
1024 "%s\\simple.shlexec",
1025 "%s\\drawback_file.noassoc",
1026 "%s\\drawback_file.noassoc foo.shlexec",
1027 "%s\\drawback_nonexist.noassoc foo.shlexec",
1046 {
NULL,
"%s\\test file.shlexec", 0x0, 33},
1047 {
NULL,
"%s\\test file.shlexec.", 0x0, 33},
1048 {
NULL,
"%s\\%%nasty%% $file.shlexec", 0x0, 33},
1049 {
NULL,
"%s/test file.shlexec", 0x0, 33},
1055 {
NULL,
"%s\\test file.noassoc.shlexec", 0x0, 33},
1059 {
"LowerL",
"%s\\nonexistent.shlexec", 0x0,
SE_ERR_FNF},
1062 {
"QuotedLowerL",
"%s\\test file.shlexec", 0x0, 33},
1063 {
"QuotedUpperL",
"%s\\test file.shlexec", 0x0, 33},
1067 {
"averb",
"%s\\test file.sha", 0x10, 33},
1070 {
NULL,
"%s\\masked file.shlexec", 0x0, 33},
1072 {
NULL,
"%s\\masked file.shlexec", 0x40, 33},
1085 {
"NoQuotes",
"%s\\test file.shlexec", 0xa, 33},
1086 {
"LowerL",
"%s\\test file.shlexec", 0xa, 33},
1087 {
"UpperL",
"%s\\test file.shlexec", 0xa, 33},
1099 skip(
"No filename parsing tests due to lack of .shlexec association\n");
1104 sprintf(fileA,
"%s\\drawback_file.noassoc foo.shlexec",
tmpdir);
1106 okShell(rc > 32,
"failed: rc=%lu\n", rc);
1109 sprintf(fileA,
"\"%s\\drawback_file.noassoc foo.shlexec\"",
tmpdir);
1112 "failed: rc=%lu\n", rc);
1115 sprintf(fileA,
"\"%s\\drawback_file.noassoc\" foo.shlexec",
tmpdir);
1123 "failed: rc=%lu\n", rc);
1126 sprintf(fileA,
"%s\\drawback_nonexist.noassoc foo.shlexec",
tmpdir);
1128 okShell(rc > 32,
"failed: rc=%lu\n", rc);
1141 okShell(rc > 32,
"failed: rc=%lu\n", rc);
1147 "failed: rc=%lu\n", rc);
1162 {
"exe arg1 arg2 \"arg three\" 'four five` six\\ $even)",
1163 {
"exe",
"arg1",
"arg2",
"arg three",
"'four",
"five`",
"six\\",
"$even)",
NULL}, 0},
1165 {
"exe arg=1 arg-2 three\tfour\rfour\nfour ",
1166 {
"exe",
"arg=1",
"arg-2",
"three",
"four\rfour\nfour",
NULL}, 0},
1168 {
"exe arg\"one\" \"second\"arg thirdarg ",
1169 {
"exe",
"argone",
"secondarg",
"thirdarg",
NULL}, 0},
1172 {
"exe arg1 \"unclosed",
1173 {
"exe",
"arg1",
"unclosed",
NULL}, 0},
1176 {
"exe",
"arg1",
"",
NULL}, 0},
1179 {
"exe \"one^\" \"arg\"&two three|four",
1180 {
"exe",
"one^",
"arg&two",
"three|four",
NULL}, 0},
1184 {
"exe",
"%TMPDIR%",
"%2",
NULL}, 0},
1187 {
"exe o\\ne t\\\\wo t\\\\\\ree f\\\\\\\\our ",
1188 {
"exe",
"o\\ne",
"t\\\\wo",
"t\\\\\\ree",
"f\\\\\\\\our",
NULL}, 0},
1190 {
"exe \"o\\ne\" \"t\\\\wo\" \"t\\\\\\ree\" \"f\\\\\\\\our\" ",
1191 {
"exe",
"o\\ne",
"t\\\\wo",
"t\\\\\\ree",
"f\\\\\\\\our",
NULL}, 0},
1196 {
"exe \\\"one \\\\\"two\" \\\\\\\"three \\\\\\\\\"four\" end",
1197 {
"exe",
"\"one",
"\\two",
"\\\"three",
"\\\\four",
"end",
NULL}, 0},
1199 {
"exe \"one\\\" still\" \"two\\\\\" \"three\\\\\\\" still\" \"four\\\\\\\\\" end",
1200 {
"exe",
"one\" still",
"two\\",
"three\\\" still",
"four\\\\",
"end",
NULL}, 0},
1209 {
"exe two\"\"quotes next",
1210 {
"exe",
"twoquotes",
"next",
NULL}, 0},
1212 {
"exe three\"\"\"quotes next",
1213 {
"exe",
"three\"quotes",
"next",
NULL}, 0},
1215 {
"exe four\"\"\"\" quotes\" next 4%3=1",
1216 {
"exe",
"four\" quotes",
"next",
"4%3=1",
NULL}, 0},
1218 {
"exe five\"\"\"\"\"quotes next",
1219 {
"exe",
"five\"quotes",
"next",
NULL}, 0},
1221 {
"exe six\"\"\"\"\"\"quotes next",
1222 {
"exe",
"six\"\"quotes",
"next",
NULL}, 0},
1224 {
"exe seven\"\"\"\"\"\"\" quotes\" next 7%3=1",
1225 {
"exe",
"seven\"\" quotes",
"next",
"7%3=1",
NULL}, 0},
1227 {
"exe twelve\"\"\"\"\"\"\"\"\"\"\"\"quotes next",
1228 {
"exe",
"twelve\"\"\"\"quotes",
"next",
NULL}, 0},
1230 {
"exe thirteen\"\"\"\"\"\"\"\"\"\"\"\"\" quotes\" next 13%3=1",
1231 {
"exe",
"thirteen\"\"\"\" quotes",
"next",
"13%3=1",
NULL}, 0},
1239 {
"exe \"two\"\"quotes next",
1240 {
"exe",
"two\"quotes",
"next",
NULL}, 0},
1242 {
"exe \"two\"\" next",
1243 {
"exe",
"two\"",
"next",
NULL}, 0},
1245 {
"exe \"three\"\"\" quotes\" next 4%3=1",
1246 {
"exe",
"three\" quotes",
"next",
"4%3=1",
NULL}, 0},
1248 {
"exe \"four\"\"\"\"quotes next",
1249 {
"exe",
"four\"quotes",
"next",
NULL}, 0},
1251 {
"exe \"five\"\"\"\"\"quotes next",
1252 {
"exe",
"five\"\"quotes",
"next",
NULL}, 0},
1254 {
"exe \"six\"\"\"\"\"\" quotes\" next 7%3=1",
1255 {
"exe",
"six\"\" quotes",
"next",
"7%3=1",
NULL}, 0},
1257 {
"exe \"eleven\"\"\"\"\"\"\"\"\"\"\"quotes next",
1258 {
"exe",
"eleven\"\"\"\"quotes",
"next",
NULL}, 0},
1260 {
"exe \"twelve\"\"\"\"\"\"\"\"\"\"\"\" quotes\" next 13%3=1",
1261 {
"exe",
"twelve\"\"\"\" quotes",
"next",
"13%3=1",
NULL}, 0},
1264 {
"exe \"the crazy \\\\\"\"\"\\\\\" quotes",
1265 {
"exe",
"the crazy \\\"\\",
"quotes",
NULL}, 0},
1278 {
"exe\"file\"path arg1",
1279 {
"exe\"file\"path",
"arg1",
NULL}, 0},
1281 {
"exe\"file\"path\targ1",
1282 {
"exe\"file\"path",
"arg1",
NULL}, 0},
1284 {
"exe\"path\\ arg1",
1285 {
"exe\"path\\",
"arg1",
NULL}, 0},
1287 {
"\\\"exe \"arg one\"",
1288 {
"\\\"exe",
"arg one",
NULL}, 0},
1290 {
"\"spaced exe\" \"next arg\"",
1291 {
"spaced exe",
"next arg",
NULL}, 0},
1293 {
"\"spaced exe\"\t\"next arg\"",
1294 {
"spaced exe",
"next arg",
NULL}, 0},
1296 {
"\"exe\"arg\" one\" argtwo",
1297 {
"exe",
"arg one",
"argtwo",
NULL}, 0},
1299 {
"\"spaced exe\\\"arg1 arg2",
1300 {
"spaced exe\\",
"arg1",
"arg2",
NULL}, 0},
1303 {
"two",
" arg1 ",
NULL}, 0},
1305 {
"\"three\"\"\" arg2",
1306 {
"three",
"",
"arg2",
NULL}, 0},
1308 {
"\"four\"\"\"\"arg1",
1309 {
"four",
"\"arg1",
NULL}, 0},
1312 {
" \"arg\"one argtwo",
1313 {
"",
"argone",
"argtwo",
NULL}, 0},
1329 if (argsW ==
NULL && cl2a_count == -1)
1331 win_skip(
"CommandLineToArgvW not implemented, skipping\n");
1334 ok(!argsW[cl2a_count] ||
broken(argsW[cl2a_count] !=
NULL) ,
1335 "expected NULL-terminated list of commandline arguments\n");
1341 ok(cl2a_count ==
count,
"%s: expected %d arguments, but got %d\n",
test->cmd,
count, cl2a_count);
1343 for (
i = 0;
i < cl2a_count;
i++)
1361 static const WCHAR exeW[] = {
'e',
'x',
'e',0};
1388 ok(numargs == 1 ||
broken(numargs > 1),
"expected 1 args, got %d\n", numargs);
1390 "expected NULL-terminated list of commandline arguments\n");
1427 {
"Params232S",
"p2 p3 p4 ",
TRUE,
1428 " p2 p3 \"p2\" \"p2 p3 p4 \""},
1434 {
"Params232S",
"\"p two\" p3 p4 ",
TRUE,
1435 " p two p3 \"p two\" \"\"p two\" p3 p4 \""},
1440 {
"Params20",
"p",
FALSE,
1444 {
"Params23456",
"'p2 p3` p4\\ $even",
FALSE,
1445 " \"'p2\" \"p3`\" \"p4\\\" \"$even\" \"\""},
1447 {
"Params23456",
"p=2 p-3 p4\tp4\rp4\np4",
TRUE,
1448 " \"p=2\" \"p-3\" \"p4\tp4\rp4\np4\" \"\" \"\""},
1456 {
"Params23456789",
"one\"quote \"p four\" one\"quote p7",
TRUE,
1457 " \"one\" \"quote\" \"p four\" \"one\" \"quote\" \"p7\" \"\" \"\""},
1459 {
"Params23456789",
"two\"\"quotes \"p three\" two\"\"quotes p5",
TRUE,
1460 " \"two\"quotes\" \"p three\" \"two\"quotes\" \"p5\" \"\" \"\" \"\" \"\""},
1462 {
"Params23456789",
"three\"\"\"quotes \"p four\" three\"\"\"quotes p6",
TRUE,
1463 " \"three\"\" \"quotes\" \"p four\" \"three\"\" \"quotes\" \"p6\" \"\" \"\""},
1465 {
"Params23456789",
"four\"\"\"\"quotes \"p three\" four\"\"\"\"quotes p5",
TRUE,
1466 " \"four\"\"quotes\" \"p three\" \"four\"\"quotes\" \"p5\" \"\" \"\" \"\" \"\""},
1471 {
"Params23456",
"\"p two\"p3 \"p four\"p5 p6",
TRUE,
1472 " \"p two\" \"p3\" \"p four\" \"p5\" \"p6\""},
1479 {
"Params23456789",
"\"one q\"uote \"p four\" \"one q\"uote p7",
TRUE,
1480 " \"one q\" \"uote\" \"p four\" \"one q\" \"uote\" \"p7\" \"\" \"\""},
1482 {
"Params23456789",
"\"two \"\" quotes\" \"p three\" \"two \"\" quotes\" p5",
TRUE,
1483 " \"two \" quotes\" \"p three\" \"two \" quotes\" \"p5\" \"\" \"\" \"\" \"\""},
1485 {
"Params23456789",
"\"three q\"\"\"uotes \"p four\" \"three q\"\"\"uotes p7",
TRUE,
1486 " \"three q\"\" \"uotes\" \"p four\" \"three q\"\" \"uotes\" \"p7\" \"\" \"\""},
1488 {
"Params23456789",
"\"four \"\"\"\" quotes\" \"p three\" \"four \"\"\"\" quotes\" p5",
TRUE,
1489 " \"four \"\" quotes\" \"p three\" \"four \"\" quotes\" \"p5\" \"\" \"\" \"\" \"\""},
1494 {
"Params23456789",
"\"\"twoquotes \"p four\" \"\"twoquotes p7",
TRUE,
1495 " \"\" \"twoquotes\" \"p four\" \"\" \"twoquotes\" \"p7\" \"\" \"\""},
1497 {
"Params23456789",
"\"\"\"three quotes\" \"p three\" \"\"\"three quotes\" p5",
TRUE,
1498 " \"\"three quotes\" \"p three\" \"\"three quotes\" \"p5\" \"\" \"\" \"\" \"\""},
1500 {
"Params23456789",
"\"\"\"\"fourquotes \"p four\" \"\"\"\"fourquotes p7",
TRUE,
1501 " \"\"\" \"fourquotes\" \"p four\" \"\"\" \"fourquotes\" \"p7\" \"\" \"\""},
1504 {
"Params23456",
"p2 \"p3\" \"p4 is lost",
TRUE,
1505 " \"p2\" \"p3\" \"\" \"\" \"\"",
1506 " \"p2\" \"p3\" \"p3\" \"\" \"\""},
1511 {
"Params23456",
"\\\"p\\three \"pfour\\\" pfive",
TRUE,
1512 " \"\\\" \"p\\three\" \"pfour\\\" \"pfive\" \"\""},
1515 {
"Params23456",
"%TMPDIR% %t %c",
FALSE,
1516 " \"%TMPDIR%\" \"%t\" \"%c\" \"\" \"\""},
1522 {
"Params2345Etc",
"p2 p3 \"p4\" p5 p6 ",
TRUE,
1523 " ~2=\"p2 p3 \"p4\" p5 p6 \" ~3=\" p3 \"p4\" p5 p6 \" ~4=\" \"p4\" p5 p6 \" ~5= p5 p6 "},
1526 {
"Params9Etc",
"p2 p3 p4 p5 p6 p7 p8 ",
TRUE,
1529 {
"Params9Etc",
"p2 p3 p4 p5 p6 p7 ",
TRUE,
1533 {
"Params9Etc",
"p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 and beyond!",
TRUE,
1534 " ~9=\" p9 p10 p11 and beyond!\""},
1539 {
"ParamsBad",
"p2 p3 p4 p5",
TRUE,
1540 " \"% - %~ %~0 %~1 %~a %~* a b c TMPDIR\""},
1555 fileA[rc] =
'a' + rc % 26;
1561 okShell(rc > 32,
"failed: rc=%lu\n", rc);
1567 skip(
"No argify tests due to lack of .shlexec association\n");
1571 create_test_verb(
"shlexec.shlexec",
"Params232S", 0,
"Params232S %2 %3 \"%2\" \"%*\"");
1572 create_test_verb(
"shlexec.shlexec",
"Params23456", 0,
"Params23456 \"%2\" \"%3\" \"%4\" \"%5\" \"%6\"");
1573 create_test_verb(
"shlexec.shlexec",
"Params23456789", 0,
"Params23456789 \"%2\" \"%3\" \"%4\" \"%5\" \"%6\" \"%7\" \"%8\" \"%9\"");
1574 create_test_verb(
"shlexec.shlexec",
"Params2345Etc", 0,
"Params2345Etc ~2=\"%~2\" ~3=\"%~3\" ~4=\"%~4\" ~5=%~5");
1575 create_test_verb(
"shlexec.shlexec",
"Params9Etc", 0,
"Params9Etc ~9=\"%~9\"");
1577 create_test_verb(
"shlexec.shlexec",
"ParamsBad", 0,
"ParamsBad \"%% %- %~ %~0 %~1 %~a %~* %a %b %c %TMPDIR%\"");
1582 while (
test->params)
1587 okShell(rc > 32,
"failed: rc=%lu\n", rc);
1595 if (!
cmd)
cmd =
"(null)";
1598 "expected '%s', got '%s'\n",
cmd,
test->cmd);
1612 skip(
"No ShellExecute/filename tests due to lack of .shlexec association\n");
1617 while (
test->basename)
1623 win_skip(
"Skipping shellexecute of file with unassociated extension\n");
1639 if ((
test->todo & 0x40)==0)
1661 verb=(
test->verb ?
test->verb :
"Open");
1671 while (
test->basename)
1685 verb=(
test->verb ?
test->verb :
"Open");
1746#define URL_SUCCESS 0x1
1747#define USE_COLON 0x2
1748#define USE_BSLASH 0x4
1753 {
"file:",
"%s\\test file.shlexec",
URL_SUCCESS, 0},
1754 {
"file:/",
"%s\\test file.shlexec",
URL_SUCCESS, 0},
1755 {
"file://",
"%s\\test file.shlexec",
URL_SUCCESS, 0},
1756 {
"file:///",
"%s\\test file.shlexec",
URL_SUCCESS, 0},
1757 {
"File:///",
"%s\\test file.shlexec",
URL_SUCCESS, 0},
1758 {
"file:////",
"%s\\test file.shlexec",
URL_SUCCESS, 0},
1759 {
"file://///",
"%s\\test file.shlexec", 0, 0},
1766 {
"file://localhost/",
"%s\\test file.shlexec",
URL_SUCCESS, 0},
1767 {
"file://localhost:80/",
"%s\\test file.shlexec", 0, 0},
1768 {
"file://LocalHost/",
"%s\\test file.shlexec",
URL_SUCCESS, 0},
1769 {
"file://127.0.0.1/",
"%s\\test file.shlexec", 0, 0},
1770 {
"file://::1/",
"%s\\test file.shlexec", 0, 0},
1771 {
"file://notahost/",
"%s\\test file.shlexec", 0, 0},
1774 {
"%urlprefix%",
"%s\\test file.shlexec", 0, 0x1},
1775 {
"file:///",
"%%TMPDIR%%\\test file.shlexec", 0, 0},
1778 {
"file://///",
"%s\\test_shortcut_shlexec.lnk", 0, 0x1c},
1781 {
"file://",
"shlproto://foo/bar",
USE_COLON, 0},
1796 skip(
"No file URL tests due to lack of .shlexec association\n");
1804 win_skip(
"shell32 is too old (likely < 4.72). Skipping the file URL tests\n");
1812 while (
test->basename)
1830 ok(rc ==
SE_ERR_FNF,
"FindExecutable(%s) failed: bad rc=%lu\n", fileurl, rc);
1833 if ((
test->todo & 0x10) == 0)
1839 win_skip(
"shell32 is too old (likely 4.72). Skipping the file URL tests\n");
1845 okShell(rc > 32,
"failed: bad rc=%lu\n", rc);
1852 "failed: bad rc=%lu\n", rc);
1876 skip(
"Unable to create 'fakeproto' class for URL tests\n");
1947 okShell(rc > 32,
"failed: rc=%lu\n", rc);
1973 skip(
"Unable to create association for '.sfe'\n");
1984 ok(rc ==
SE_ERR_FNF || rc > 32 ,
"FindExecutable(NULL) returned %ld\n", rc);
1989 strcat( notepad_path,
"\\notepad.exe" );
1994 ok(rc > 32,
"FindExecutable(%s) returned %ld\n",
"notepad.exe", rc);
2000 ok(rc > 32,
"FindExecutable(%s) returned %ld\n",
"notepad.exe", rc);
2005 ok(rc ==
SE_ERR_NOASSOC || rc > 32 ,
"FindExecutable(NULL) returned %ld\n", rc);
2010 ok(rc > 32,
"FindExecutable(%s) returned %ld\n",
filename, rc);
2014 ok(rc > 32,
"FindExecutable(%s) returned %ld\n",
filename, rc);
2023 skip(
"Unable to create association for '.shl'\n");
2047 win_skip(
"FindExecutable() is broken -> not running 4+ character extension tests\n");
2053 skip(
"No FindExecutable/filename tests due to lack of .shlexec association\n");
2058 while (
test->basename)
2078 ok(rc==
test->rc,
"FindExecutable(%s) failed: rc=%ld\n",
filename, rc);
2086 ok(
equal,
"FindExecutable(%s) returned command='%s' instead of '%s'\n",
2097 {
NULL,
"%s\\nonexistent.shlexec", 0xa, 33},
2098 {
NULL,
"%s\\nonexistent.noassoc", 0xa, 33},
2101 {
NULL,
"%s\\test file.shlexec", 0xa, 33},
2102 {
NULL,
"%s/%%nasty%% $file.shlexec", 0xa, 33},
2105 {
NULL,
"%s\\test file.noassoc", 0xa, 33},
2118 skip(
"No FindExecutable/filename tests due to lack of .shlexec association\n");
2179 while (
test->basename)
2215 okShell(rc > 32,
"returned %lu\n", rc);
2232 win_skip(
"Skipping shellexecute of file with unassociated extension\n");
2283 {
"",
"[open(\"%1\")]",
"shlexec",
"dde",
NULL, 0,
"[open(\"%s\")]"},
2284 {
"\"%1\"",
"[open(\"%1\")]",
"shlexec",
"dde",
NULL, 1,
"[open(\"%s\")]"},
2288 {
"%1",
"[open(%1)]",
"shlexec",
"dde",
NULL, 2,
"[open(%s)]",
TRUE },
2291 {
"",
"[open(\"%1\")]",
"shlexec",
"dde",
"[ifexec(\"%1\")]", 0,
"[ifexec(\"%s\")]"},
2294 {
"",
"[open(\"%1\")]",
"shlexec",
NULL,
NULL, 0,
"[open(\"%s\")]"},
2297 {
"",
"[open(\"%1\")]",
NULL,
"dde",
NULL, 0,
"[open(\"%s\")]"},
2307 trace(
"WaitForInputIdle() waiting for dde event timeout=min(%u,5s)\n",
timeout);
2325 DWORD import_directory_rva;
2335 while (
U(*import_descriptor).OriginalFirstThunk != 0)
2337 char *import_module_name;
2339 import_module_name =
base + import_descriptor->
Name;
2340 if (
lstrcmpiA(import_module_name,
"user32.dll") == 0 ||
2341 lstrcmpiA(import_module_name,
"user32") == 0)
2358 if (
lstrcmpA((
char *) import_by_name->
Name,
"WaitForInputIdle") == 0)
2366 trace(
"Hooked %s.WaitForInputIdle\n", import_module_name);
2377 import_descriptor++;
2379 ok(hook_count,
"Could not hook WaitForInputIdle()\n");
2398 *
strchr(defApplication,
'.') = 0;
2401 4096,
"winetest_shlexec_dde_map");
2406 while (
test->command)
2410 skip(
"Unable to create association for '.sde'\n");
2418 strcpy(shared_block,
test->application ?
test->application : defApplication);
2423 shared_block[0] =
'\0';
2424 shared_block[1] =
'\0';
2441 trace(
"Adding SEE_MASK_WAITFORINPUTIDLE for Windows 10\n");
2451 "WaitForInputIdle() was called %u times\n",
2479#define DDE_DEFAULT_APP_VARIANTS 3
2495 {
"%s\\test file.exe", {
"test file",
"test file",
"test"}, 0x0, {33, 33, 33}},
2496 {
"%s\\test2 file.exe", {
"test2",
"",
"test2"}, 0x0, {33, 5, 33}},
2499 {
"%s\\test file.exe param", {
"test file",
"test file",
"test"}, 0x0, {33, 33, 33}},
2502 {
"\"%s\\test file.exe\"", {
"test file",
"test file",
"test file"}, 0x0, {33, 33, 33}},
2503 {
"\"%s\\test file.exe\" param", {
"test file",
"test file",
"test file"}, 0x0, {33, 33, 33}},
2507 {
"%s\\test2 file.exe param", {
"test2",
"",
"test2"}, 0x0, {33, 5, 33}},
2510 {
"\"%s\\test2 file.exe\"", {
"",
"",
"test2 file"}, 0x0, {5, 2, 33}},
2511 {
"\"%s\\test2 file.exe\" param", {
"",
"",
"test2 file"}, 0x0, {5, 2, 33}},
2514 {
"%s\\test2", {
"test2",
"",
"test2"}, 0x0, {33, 5, 33}},
2515 {
"%s\\test2 param", {
"test2",
"",
"test2"}, 0x0, {33, 5, 33}},
2518 {
"%s\\notexist.exe", {
"",
"",
"notexist"}, 0x0, {5, 2, 33}},
2519 {
"%s\\notexist.exe param", {
"",
"",
"notexist"}, 0x0, {5, 2, 33}},
2522 {
"cmd", {
"cmd",
"cmd",
"cmd"}, 0x0, {33, 33, 33}},
2523 {
"cmd param", {
"cmd",
"cmd",
"cmd"}, 0x0, {33, 33, 33}},
2526 {
"xyzwxyzwxyz", {
"",
"",
"xyzwxyzwxyz"}, 0x0, {5, 2, 33}},
2527 {
"xyzwxyzwxyz param", {
"",
"",
"xyzwxyzwxyz"}, 0x0, {5, 2, 33}},
2581 while (
test->command)
2587 skip(
"Unable to create association for '.sde'\n");
2602 rc =
msg.wParam > 32 ? 33 :
msg.wParam;
2630 "Expected application '%s', got '%s'\n",
2642 ok(
b,
"got %d\n",
b);
2644 ok(
b,
"got %d\n",
b);
2646 ok(
b,
"got %d\n",
b);
2656 const char*
const * testfile;
2667 trace(
"major=%d minor=%d build=%d platform=%d\n",
2677 ok(
r ==
S_OK,
"CoInitialize failed (0x%08x)\n",
r);
2682 ok(rc != 0 && rc <
sizeof(
argv0),
"got %d\n", rc);
2687 "unable to find argv0!\n");
2705 ok(rc != 0,
"got %d\n", rc);
2734 desc.arguments=
"ignored";
2759 skip(
"Unable to create association for '.shlexec'\n");
2765 create_test_verb(
"shlexec.shlexec",
"QuotedLowerL", 0,
"QuotedLowerL \"%l\"");
2767 create_test_verb(
"shlexec.shlexec",
"QuotedUpperL", 0,
"QuotedUpperL \"%L\"");
2783 const char*
const * testfile;
2811 char params[1024], dirpath[1024];
2824 okShell(rc > 32,
"returned %lu\n", rc);
2837 okShell(rc > 32,
"returned %lu\n", rc);
2849 okShell(rc > 32,
"returned %lu\n", rc);
char * strcat(char *DstString, const char *SrcString)
int strcmp(const char *String1, const char *String2)
char * strstr(char *String1, char *String2)
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
char * strcpy(char *DstString, const char *SrcString)
char * strchr(const char *String, int ch)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
void shell(int argc, const char *argv[])
#define RegCloseKey(hKey)
HSZ WINAPI DdeCreateStringHandleA(DWORD, LPCSTR, INT)
#define CBF_FAIL_REQUESTS
INT WINAPI DdeCmpStringHandles(HSZ, HSZ)
#define CBF_SKIP_ALLNOTIFICATIONS
BOOL WINAPI DdeUninitialize(DWORD)
DWORD WINAPI DdeQueryStringA(DWORD, HSZ, LPSTR, DWORD, INT)
BOOL WINAPI DdeFreeStringHandle(DWORD, HSZ)
HDDEDATA WINAPI DdeNameService(DWORD, HSZ, HSZ, UINT)
BOOL WINAPI DdeFreeDataHandle(HDDEDATA)
DWORD WINAPI DdeGetData(HDDEDATA, LPBYTE, DWORD, DWORD)
UINT WINAPI DdeInitializeA(LPDWORD, PFNCALLBACK, DWORD, DWORD)
#define ERROR_NOT_ENOUGH_MEMORY
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
LONG WINAPI RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE *lpData, DWORD cbData)
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
LONG WINAPI RegQueryInfoKeyA(HKEY hKey, LPSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
LONG WINAPI RegEnumValueA(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpdwReserved, _Out_opt_ LPDWORD lpdwType, _Out_opt_ LPBYTE lpData, _Inout_opt_ LPDWORD lpcbData)
LONG WINAPI RegDeleteValueA(HKEY hKey, LPCSTR lpValueName)
LONG WINAPI RegCreateKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD Reserved, _In_ LPSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_ LPDWORD lpdwDisposition)
LONG WINAPI RegEnumKeyExA(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
#define ERROR_INVALID_PARAMETER
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define FILE_ATTRIBUTE_NORMAL
#define GetEnvironmentVariableA(x, y, z)
#define MultiByteToWideChar
#define ERROR_ACCESS_DENIED
static void cleanup(void)
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 RemoveDirectoryA(IN LPCSTR lpPathName)
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI SetFileAttributesA(LPCSTR lpFileName, DWORD dwFileAttributes)
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
HANDLE WINAPI FindFirstFileA(IN LPCSTR lpFileName, OUT LPWIN32_FIND_DATAA lpFindFileData)
BOOL WINAPI FindClose(HANDLE hFindFile)
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 GetLongPathNameA(IN LPCSTR lpszShortPath, OUT LPSTR lpszLongPath, IN DWORD cchBuffer)
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
UINT WINAPI GetSystemDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
BOOL WINAPI GetExitCodeProcess(IN HANDLE hProcess, IN LPDWORD lpExitCode)
VOID WINAPI ExitProcess(IN UINT uExitCode)
LPSTR WINAPI GetCommandLineA(VOID)
VOID WINAPI ExitThread(IN DWORD uExitCode)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
INT WINAPI GetPrivateProfileStringA(LPCSTR section, LPCSTR entry, LPCSTR def_val, LPSTR buffer, UINT len, LPCSTR filename)
UINT WINAPI GetPrivateProfileIntA(LPCSTR section, LPCSTR entry, INT def_val, LPCSTR filename)
BOOL WINAPI DECLSPEC_HOTPATCH WritePrivateProfileStringA(LPCSTR section, LPCSTR entry, LPCSTR string, LPCSTR filename)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HANDLE NTAPI CreateFileMappingA(IN HANDLE hFile, IN LPSECURITY_ATTRIBUTES lpFileMappingAttributes, IN DWORD flProtect, IN DWORD dwMaximumSizeHigh, IN DWORD dwMaximumSizeLow, IN LPCSTR lpName)
HANDLE NTAPI OpenFileMappingA(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCSTR lpName)
UINT WINAPI GetTempFileNameA(IN LPCSTR lpPathName, IN LPCSTR lpPrefixString, IN UINT uUnique, OUT LPSTR lpTempFileName)
PIMAGE_NT_HEADERS32 PIMAGE_NT_HEADERS
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble r
GLboolean GLboolean GLboolean b
GLenum const GLfloat * params
GLenum GLuint GLenum GLsizei const GLchar * buf
GLubyte GLubyte GLubyte GLubyte w
GLfloat GLfloat GLfloat GLfloat h
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
HLOCAL NTAPI LocalFree(HLOCAL hMem)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
int __cdecl vsprintf(char *_Dest, const char *_Format, va_list _Args)
#define trace_(file, line,...)
#define ERROR_FILE_NOT_FOUND
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
#define sprintf(buf, format,...)
static char shortpath[MAX_PATH]
static const WCHAR desc[]
#define todo_wine_if(is_todo)
static __ms_va_list valist
unsigned __int3264 UINT_PTR
#define KEY_CREATE_SUB_KEY
struct _IMAGE_IMPORT_DESCRIPTOR * PIMAGE_IMPORT_DESCRIPTOR
#define IMAGE_SNAP_BY_ORDINAL(Ordinal)
PIMAGE_THUNK_DATA32 PIMAGE_THUNK_DATA
#define IMAGE_DIRECTORY_ENTRY_IMPORT
struct _IMAGE_IMPORT_BY_NAME * PIMAGE_IMPORT_BY_NAME
static const char topic[]
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
const char * winetest_platform
LONG winetest_get_failures(void)
void __winetest_cdecl winetest_ok(int condition, const char *msg,...)
int winetest_get_mainargs(char ***pargv)
#define WINETEST_PRINTF_ATTR(fmt, args)
void winetest_add_failures(LONG new_failures)
LPWSTR *WINAPI CommandLineToArgvW(LPCWSTR lpCmdline, int *numargs)
#define create_lnk(a, b, c)
#define SEE_MASK_DOENVSUBST
#define SEE_MASK_NOCLOSEPROCESS
#define SEE_MASK_CLASSNAME
#define SE_ERR_ACCESSDENIED
#define SEE_MASK_NOZONECHECKS
#define SEE_MASK_WAITFORINPUTIDLE
#define SEE_MASK_FLAG_DDEWAIT
#define SEE_MASK_FLAG_NO_UI
#define SEE_MASK_NO_CONSOLE
static INT_PTR shell_execute_ex_(const char *file, int line, DWORD mask, LPCSTR verb, LPCSTR filename, LPCSTR parameters, LPCSTR directory, LPCSTR class)
static filename_tests_t noquotes_tests[]
static void test_urls(void)
static HDDEDATA CALLBACK ddeCb(UINT uType, UINT uFmt, HCONV hConv, HSZ hsz1, HSZ hsz2, HDDEDATA hData, ULONG_PTR dwData1, ULONG_PTR dwData2)
static void dump_child_(const char *file, int line)
static void create_test_verb(const char *classname, const char *verb, int rawcmd, const char *cmdtail)
#define shell_execute(verb, filename, parameters, directory)
static DLLVERSIONINFO dllver
static void test_dde_default_app(void)
static void test_find_executable(void)
static void test_dde(void)
#define shell_execute_ex(mask, verb, filename, parameters, directory, class)
#define CHILD_DDE_TIMEOUT
static const char * encodeA(const char *str)
static void okChildInt_(const char *file, int line, const char *key, int expected)
static BOOL post_quit_on_execute
static char child_file[MAX_PATH]
static int bad_shellexecute
static HANDLE dde_ready_event
#define okChildString(key, expected)
static void test_directory(void)
static void create_test_verb_dde(const char *classname, const char *verb, int rawcmd, const char *cmdtail, const char *ddeexec, const char *application, const char *topic, const char *ifexec)
static void test_commandline2argv(void)
static void test_exes(void)
static void reset_association_description(void)
static BOOL test_one_cmdline(const cmdline_tests_t *test)
static const argify_tests_t argify_tests[]
static fileurl_tests_t fileurl_tests[]
static char shell_call[2048]
static const char * testfiles[]
static void test_lnks(void)
static unsigned decode_char(char c)
static dde_default_app_tests_t dde_default_app_tests[]
static DWORD get_long_path_name(const char *shortpath, char *longpath, DWORD longlen)
static BOOL skip_shlexec_tests
#define okChildStringBroken(key, expected, broken)
static char * decodeA(const char *str)
static int StrCmpPath(const char *s1, const char *s2)
static INT_PTR shell_execute_(const char *file, int line, LPCSTR verb, LPCSTR filename, LPCSTR parameters, LPCSTR directory)
#define okShell_(file, line)
static void test_filename(void)
static void test_fileurls(void)
static void hook_WaitForInputIdle(DWORD(WINAPI *new_func)(HANDLE, DWORD))
static void CALLBACK childTimeout(HWND wnd, UINT msg, UINT_PTR timer, DWORD time)
static DWORD WINAPI hooked_WaitForInputIdle(HANDLE process, DWORD timeout)
static void init_test(void)
#define okChildInt(key, expected)
static const cmdline_tests_t cmdline_tests[]
static int waitforinputidle_count
static filename_tests_t lnk_tests[]
static BOOL create_test_class(const char *class, BOOL protocol)
static void okChildString_(const char *file, int line, const char *key, const char *expected, const char *bad)
static void okChildIntBroken_(const char *file, int line, const char *key, int expected)
static char ddeExec[MAX_PATH]
static void test_argify(void)
#define okChildIntBroken(key, expected)
#define DDE_DEFAULT_APP_VARIANTS
static filename_tests_t filename_tests[]
static void init_event(const char *child_file)
static char tmpdir[MAX_PATH]
static void delete_test_class(const char *classname)
static char ddeApplication[MAX_PATH]
static BOOL create_test_association(const char *extension)
static char assoc_desc[2048]
static void delete_test_association(const char *extension)
#define okChildPath(key, expected)
static void doChild(int argc, char **argv)
static char argv0[MAX_PATH]
static LSTATUS myRegDeleteTreeA(HKEY hKey, LPCSTR lpszSubKey)
static dde_tests_t dde_tests[]
static void strcat_param(char *str, const char *name, const char *param)
static DWORD CALLBACK ddeThread(LPVOID arg)
static void cleanup_test(void)
static BOOL skip_noassoc_tests
static char * getChildString(const char *sect, const char *key)
static void okChildPath_(const char *file, int line, const char *key, const char *expected)
static void test_lpFile_parsed(void)
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExA(LPSHELLEXECUTEINFOA sei)
HINSTANCE WINAPI FindExecutableA(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult)
HINSTANCE WINAPI ShellExecuteA(HWND hWnd, LPCSTR lpVerb, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, INT iShowCmd)
union _IMAGE_THUNK_DATA32::@2138 u1
const char * expectedDdeExec
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventA(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
HANDLE WINAPI DECLSPEC_HOTPATCH OpenEventA(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCSTR lpName)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define INVALID_FILE_ATTRIBUTES
BOOL NTAPI VirtualProtect(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flNewProtect, OUT PDWORD lpflOldProtect)
#define success(from, fromstr, to, tostr)
DWORD WINAPI GetLastError(void)
DWORD WINAPI GetCurrentThreadId(void)
#define EVENT_MODIFY_STATE
#define __ms_va_end(list)
#define __ms_va_start(list, arg)
#define HKEY_CLASSES_ROOT
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
DWORD WINAPI WaitForInputIdle(_In_ HANDLE, _In_ DWORD)
BOOL WINAPI PostThreadMessageA(_In_ DWORD, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
BOOL WINAPI GetMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
HWND WINAPI FindWindowA(_In_opt_ LPCSTR, _In_opt_ LPCSTR)