James Hawkins : advpack: Define S_ASYNCHRONOUS in advpub.h.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Mar 27 05:29:13 CST 2006


Module: wine
Branch: refs/heads/master
Commit: e4b31800ab84d0ea28bc66363ae70bcf19f7a166
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=e4b31800ab84d0ea28bc66363ae70bcf19f7a166

Author: James Hawkins <truiken at gmail.com>
Date:   Sun Mar 26 21:40:26 2006 -0600

advpack: Define S_ASYNCHRONOUS in advpub.h.

---

 dlls/advpack/tests/install.c |   12 ++++--------
 include/advpub.h             |    4 ++++
 include/urlmon.idl           |    2 ++
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/dlls/advpack/tests/install.c b/dlls/advpack/tests/install.c
index 6d0daae..4810868 100644
--- a/dlls/advpack/tests/install.c
+++ b/dlls/advpack/tests/install.c
@@ -21,7 +21,6 @@
 #include <stdio.h>
 #include <windows.h>
 #include <advpub.h>
-#include <urlmon.h>
 #include "wine/test.h"
 
 /* function pointers */
@@ -67,7 +66,7 @@ static void test_RunSetupCommand()
 
     /* try a bad directory */
     hexe = (HANDLE)0xdeadbeef;
-    hr = pRunSetupCommand(NULL, "winver.exe", "Install", "windows\\system32", "Title", &hexe, 0, NULL);
+    hr = pRunSetupCommand(NULL, "winve.exe", "Install", "", "Title", &hexe, 0, NULL);
     todo_wine
     {
         ok(hr == HRESULT_FROM_WIN32(ERROR_DIRECTORY),
@@ -89,12 +88,9 @@ static void test_RunSetupCommand()
     /* run winver.exe */
     hexe = (HANDLE)0xdeadbeef;
     hr = pRunSetupCommand(NULL, "winver.exe", "Install", "c:\\windows\\system32", "Title", &hexe, 0, NULL);
-    todo_wine
-    {
-        ok(hr == S_ASYNCHRONOUS, "Expected S_ASYNCHRONOUS, got %ld\n", hr);
-        ok(hexe != NULL, "Expected hexe to be non-NULL\n");
-        ok(TerminateProcess(hexe, 0), "Expected TerminateProcess to succeed\n");
-    }
+    ok(hr == S_ASYNCHRONOUS, "Expected S_ASYNCHRONOUS, got %ld\n", hr);
+    ok(hexe != NULL, "Expected hexe to be non-NULL\n");
+    ok(TerminateProcess(hexe, 0), "Expected TerminateProcess to succeed\n");
 }
 
 START_TEST(install)
diff --git a/include/advpub.h b/include/advpub.h
index 442e8e2..6b38ffe 100644
--- a/include/advpub.h
+++ b/include/advpub.h
@@ -25,6 +25,10 @@
 extern "C" {
 #endif
 
+#ifndef S_ASYNCHRONOUS
+#define S_ASYNCHRONOUS  _HRESULT_TYPEDEF_(0x401E8L)
+#endif
+
 typedef struct _CabInfoA
 {
     LPSTR  pszCab;
diff --git a/include/urlmon.idl b/include/urlmon.idl
index 96f665b..37fddf0 100644
--- a/include/urlmon.idl
+++ b/include/urlmon.idl
@@ -1146,7 +1146,9 @@ cpp_quote("DEFINE_GUID(CLSID_MkProtocol,
 
 
 cpp_quote("#define MK_S_ASYNCHRONOUS                0x000401E8")
+cpp_quote("#ifndef S_ASYNCHRONOUS")
 cpp_quote("#define S_ASYNCHRONOUS                   MK_S_ASYNCHRONOUS")
+cpp_quote("#endif")
 
 cpp_quote("#define INET_E_ERROR_FIRST               0x800C0002")
 cpp_quote("#define INET_E_INVALID_URL               0x800C0002")




More information about the wine-cvs mailing list