Remove unnecessary executable bits
[reactos.git] / modules / rostests / winetests / shell32 / shlexec.c
old mode 100755 (executable)
new mode 100644 (file)
index 9db12ce..a8aabac
  */
 
 /* 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>
@@ -44,6 +46,8 @@
 #include "shellapi.h"
 #include "shlwapi.h"
 #include "ddeml.h"
+
+#include "wine/heap.h"
 #include "wine/test.h"
 
 #include "shell32_test.h"
@@ -759,7 +763,7 @@ static LSTATUS myRegDeleteTreeA(HKEY hKey, LPCSTR lpszSubKey)
     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;
@@ -794,7 +798,7 @@ static LSTATUS myRegDeleteTreeA(HKEY hKey, LPCSTR lpszSubKey)
 cleanup:
     /* Free buffer if allocated */
     if (lpszName != szNameBuf)
-        HeapFree( GetProcessHeap(), 0, lpszName);
+        heap_free(lpszName);
     if(lpszSubKey)
         RegCloseKey(hSubKey);
     return ret;
@@ -854,11 +858,11 @@ static void create_test_verb_dde(const char* classname, const char* verb,
     }
     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)
@@ -1827,7 +1831,7 @@ static fileurl_tests_t fileurl_tests[]=
     {"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},
@@ -1973,11 +1977,11 @@ static void test_urls(void)
     }
 
     /* 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);
@@ -2180,13 +2184,13 @@ static void test_lnks(void)
         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 */