[ros-diffs] [winesync] 26493: Autosyncing with Wine HEAD

winesync at svn.reactos.org winesync at svn.reactos.org
Wed Apr 25 10:20:01 CEST 2007


Author: winesync
Date: Wed Apr 25 12:20:01 2007
New Revision: 26493

URL: http://svn.reactos.org/svn/reactos?rev=26493&view=rev
Log:
Autosyncing with Wine HEAD

Modified:
    trunk/reactos/dll/win32/advpack/advpack.c
    trunk/reactos/dll/win32/advpack/advpack.rbuild
    trunk/reactos/dll/win32/advpack/install.c
    trunk/reactos/dll/win32/advpack/reg.c

Modified: trunk/reactos/dll/win32/advpack/advpack.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advpack/advpack.c?rev=26493&r1=26492&r2=26493&view=diff
==============================================================================
--- trunk/reactos/dll/win32/advpack/advpack.c (original)
+++ trunk/reactos/dll/win32/advpack/advpack.c Wed Apr 25 12:20:01 2007
@@ -25,7 +25,6 @@
 #include "winbase.h"
 #include "winuser.h"
 #include "winreg.h"
-#include "winver.h"
 #include "winternl.h"
 #include "winnls.h"
 #include "setupapi.h"

Modified: trunk/reactos/dll/win32/advpack/advpack.rbuild
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advpack/advpack.rbuild?rev=26493&r1=26492&r2=26493&view=diff
==============================================================================
--- trunk/reactos/dll/win32/advpack/advpack.rbuild (original)
+++ trunk/reactos/dll/win32/advpack/advpack.rbuild Wed Apr 25 12:20:01 2007
@@ -9,6 +9,7 @@
 	<define name="_WIN32_WINNT">0x501</define>
 	<define name="WINVER">0x501</define>
 	<library>wine</library>
+	<library>ole32</library>
 	<library>setupapi</library>
 	<library>version</library>
 	<library>user32</library>

Modified: trunk/reactos/dll/win32/advpack/install.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advpack/install.c?rev=26493&r1=26492&r2=26493&view=diff
==============================================================================
--- trunk/reactos/dll/win32/advpack/install.c (original)
+++ trunk/reactos/dll/win32/advpack/install.c Wed Apr 25 12:20:01 2007
@@ -25,11 +25,11 @@
 #include "winbase.h"
 #include "winuser.h"
 #include "winreg.h"
-#include "winver.h"
 #include "winternl.h"
 #include "winnls.h"
 #include "setupapi.h"
 #include "advpub.h"
+#include "ole2.h"
 #include "wine/debug.h"
 #include "wine/unicode.h"
 #include "advpack_private.h"
@@ -58,7 +58,7 @@
     BOOL need_reboot;
 } ADVInfo;
 
-typedef HRESULT (*iterate_fields_func)(HINF hinf, PCWSTR field, void *arg);
+typedef HRESULT (*iterate_fields_func)(HINF hinf, PCWSTR field, const void *arg);
 
 /* Advanced INF commands */
 static const WCHAR CheckAdminRights[] = {
@@ -75,7 +75,7 @@
 };
 
 /* Advanced INF callbacks */
-static HRESULT del_dirs_callback(HINF hinf, PCWSTR field, void *arg)
+static HRESULT del_dirs_callback(HINF hinf, PCWSTR field, const void *arg)
 {
     INFCONTEXT context;
     HRESULT hr = S_OK;
@@ -98,7 +98,7 @@
     return hr;
 }
 
-static HRESULT per_user_install_callback(HINF hinf, PCWSTR field, void *arg)
+static HRESULT per_user_install_callback(HINF hinf, PCWSTR field, const void *arg)
 {
     PERUSERSECTIONW per_user;
     INFCONTEXT context;
@@ -141,7 +141,7 @@
     return SetPerUserSecValuesW(&per_user);
 }
 
-static HRESULT register_ocxs_callback(HINF hinf, PCWSTR field, void *arg)
+static HRESULT register_ocxs_callback(HINF hinf, PCWSTR field, const void *arg)
 {
     HMODULE hm;
     INFCONTEXT context;
@@ -159,21 +159,29 @@
             continue;
 
         hm = LoadLibraryExW(buffer, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
-        if (!hm)
-            continue;
-
-        if (do_ocx_reg(hm, TRUE))
+        if (hm)
+        {
+            if (do_ocx_reg(hm, TRUE))
+                hr = E_FAIL;
+
+            FreeLibrary(hm);
+        }
+        else
             hr = E_FAIL;
 
-        FreeLibrary(hm);
-    }
-
-    return hr;
-}
-
-static HRESULT run_setup_commands_callback(HINF hinf, PCWSTR field, void *arg)
-{
-    ADVInfo *info = (ADVInfo *)arg;
+        if (FAILED(hr))
+        {
+            /* FIXME: display a message box */
+            break;
+        }
+    }
+
+    return hr;
+}
+
+static HRESULT run_setup_commands_callback(HINF hinf, PCWSTR field, const void *arg)
+{
+    const ADVInfo *info = (const ADVInfo *)arg;
     INFCONTEXT context;
     HRESULT hr = S_OK;
     DWORD size;
@@ -282,7 +290,7 @@
     return hr;
 }
 
-static HRESULT check_admin_rights(ADVInfo *info)
+static HRESULT check_admin_rights(const ADVInfo *info)
 {
     INT check;
     INFCONTEXT context;
@@ -302,7 +310,7 @@
 }
 
 /* performs a setupapi-level install of the INF file */
-static HRESULT spapi_install(ADVInfo *info)
+static HRESULT spapi_install(const ADVInfo *info)
 {
     BOOL ret;
     HRESULT res;
@@ -350,8 +358,10 @@
     if (hr != S_OK)
         return hr;
 
+    OleInitialize(NULL);
     hr = iterate_section_fields(info->hinf, info->install_sec,
                                 RegisterOCXs, register_ocxs_callback, NULL);
+    OleUninitialize();
     if (hr != S_OK)
         return hr;
 
@@ -500,7 +510,7 @@
 }
 
 /* release the install instance information */
-static void install_release(ADVInfo *info)
+static void install_release(const ADVInfo *info)
 {
     if (info->hinf && info->hinf != INVALID_HANDLE_VALUE)
         SetupCloseInfFile(info->hinf);

Modified: trunk/reactos/dll/win32/advpack/reg.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advpack/reg.c?rev=26493&r1=26492&r2=26493&view=diff
==============================================================================
--- trunk/reactos/dll/win32/advpack/reg.c (original)
+++ trunk/reactos/dll/win32/advpack/reg.c Wed Apr 25 12:20:01 2007
@@ -25,7 +25,6 @@
 #include "winerror.h"
 #include "winuser.h"
 #include "winternl.h"
-#include "setupapi.h"
 #include "advpub.h"
 #include "wine/unicode.h"
 #include "wine/debug.h"
@@ -221,7 +220,7 @@
  */
 HRESULT WINAPI RegInstallW(HMODULE hm, LPCWSTR pszSection, const STRTABLEW* pstTable)
 {
-    int i;
+    unsigned int i;
     CABINFOW cabinfo;
     WCHAR tmp_ini_path[MAX_PATH];
     HRESULT hr = E_FAIL;




More information about the Ros-diffs mailing list