*/
/* Needed to get SEE_MASK_NOZONECHECKS with the PSDK */
+#ifndef __REACTOS__
#define NTDDI_WINXPSP1 0x05010100
#define NTDDI_VERSION NTDDI_WINXPSP1
#define _WIN32_WINNT 0x0501
+#endif
#include <stdio.h>
#include <assert.h>
#include "shellapi.h"
#include "shlwapi.h"
#include "ddeml.h"
+
+#include "wine/heap.h"
#include "wine/test.h"
#include "shell32_test.h"
if (dwMaxLen > sizeof(szNameBuf)/sizeof(CHAR))
{
/* Name too big: alloc a buffer for it */
- if (!(lpszName = HeapAlloc( GetProcessHeap(), 0, dwMaxLen*sizeof(CHAR))))
+ if (!(lpszName = heap_alloc(dwMaxLen*sizeof(CHAR))))
{
ret = ERROR_NOT_ENOUGH_MEMORY;
goto cleanup;
cleanup:
/* Free buffer if allocated */
if (lpszName != szNameBuf)
- HeapFree( GetProcessHeap(), 0, lpszName);
+ heap_free(lpszName);
if(lpszSubKey)
RegCloseKey(hSubKey);
return ret;
}
else
{
- cmd=HeapAlloc(GetProcessHeap(), 0, strlen(argv0)+10+strlen(child_file)+2+strlen(cmdtail)+1);
+ cmd = heap_alloc(strlen(argv0) + 10 + strlen(child_file) + 2 + strlen(cmdtail) + 1);
sprintf(cmd,"%s shlexec \"%s\" %s", argv0, child_file, cmdtail);
rc=RegSetValueExA(hkey_cmd, NULL, 0, REG_SZ, (LPBYTE)cmd, strlen(cmd)+1);
ok(rc == ERROR_SUCCESS, "setting command failed with %d\n", rc);
- HeapFree(GetProcessHeap(), 0, cmd);
+ heap_free(cmd);
}
if (ddeexec)
{"file:///", "%%TMPDIR%%\\test file.shlexec", 0, 0},
/* Test shortcuts vs. URLs */
- {"file://///", "%s\\test_shortcut_shlexec.lnk", 0, 0x1d},
+ {"file://///", "%s\\test_shortcut_shlexec.lnk", 0, 0x1c},
/* Confuse things by mixing protocols */
{"file://", "shlproto://foo/bar", USE_COLON, 0},
}
/* A .lnk ending does not turn a URL into a shortcut */
- todo_wait rc = shell_execute(NULL, "shlproto://foo/bar.lnk", NULL, NULL);
+ rc = shell_execute(NULL, "shlproto://foo/bar.lnk", NULL, NULL);
ok(rc > 32, "%s failed: rc=%lu\n", shell_call, rc);
okChildInt("argcA", 5);
- todo_wine okChildString("argvA3", "URL");
- todo_wine okChildString("argvA4", "shlproto://foo/bar.lnk");
+ okChildString("argvA3", "URL");
+ okChildString("argvA4", "shlproto://foo/bar.lnk");
/* Neither does a .exe extension */
rc = shell_execute(NULL, "shlproto://foo/bar.exe", NULL, NULL);
get_long_path_name(params, filename, sizeof(filename));
okChildPath("argvA4", filename);
- todo_wait rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_DOENVSUBST, NULL, "%TMPDIR%\\test_shortcut_shlexec.lnk", NULL, NULL, NULL);
+ rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_DOENVSUBST, NULL, "%TMPDIR%\\test_shortcut_shlexec.lnk", NULL, NULL, NULL);
okShell(rc > 32, "failed: rc=%lu err=%u\n", rc, GetLastError());
okChildInt("argcA", 5);
- todo_wine okChildString("argvA3", "Open");
+ okChildString("argvA3", "Open");
sprintf(params, "%s\\test file.shlexec", tmpdir);
get_long_path_name(params, filename, sizeof(filename));
- todo_wine okChildPath("argvA4", filename);
+ okChildPath("argvA4", filename);
}
/* Should just run our executable */