xref: /reactos/dll/win32/mshtml/ros_diff.patch (revision c2c66aff)
1*c2c66affSColin Finck--- C:/Users/CHRIST~1/AppData/Local/Temp/install.-rev47414.svn001.tmp.c	Sa Mai 29 16:46:40 2010
2*c2c66affSColin Finck+++ C:/Users/Christoph/Desktop/Projekte/ReactOS/dll/win32/mshtml/install.c	Sa Mai 29 16:43:49 2010
3*c2c66affSColin Finck@@ -60,6 +60,11 @@
4*c2c66affSColin Finck      '\\','W','i','n','e',
5*c2c66affSColin Finck      '\\','M','S','H','T','M','L',0};
6*c2c66affSColin Finck
7*c2c66affSColin Finck+static const CHAR mshtml_keyA[] =
8*c2c66affSColin Finck+    {'S','o','f','t','w','a','r','e',
9*c2c66affSColin Finck+    '\\','W','i','n','e',
10*c2c66affSColin Finck+    '\\','M','S','H','T','M','L',0};
11*c2c66affSColin Finck+
12*c2c66affSColin Finck static HWND install_dialog = NULL;
13*c2c66affSColin Finck static LPWSTR tmp_file_name = NULL;
14*c2c66affSColin Finck static HANDLE tmp_file = INVALID_HANDLE_VALUE;
15*c2c66affSColin Finck@@ -225,23 +230,18 @@
16*c2c66affSColin Finck static BOOL install_from_registered_dir(void)
17*c2c66affSColin Finck {
18*c2c66affSColin Finck     char *file_name;
19*c2c66affSColin Finck-    HKEY hkey;
20*c2c66affSColin Finck     DWORD res, type, size = MAX_PATH;
21*c2c66affSColin Finck     BOOL ret;
22*c2c66affSColin Finck
23*c2c66affSColin Finck+    file_name = heap_alloc(size+sizeof(GECKO_FILE_NAME));
24*c2c66affSColin Finck     /* @@ Wine registry key: HKCU\Software\Wine\MSHTML */
25*c2c66affSColin Finck-    res = RegOpenKeyW(HKEY_CURRENT_USER, mshtml_keyW, &hkey);
26*c2c66affSColin Finck-    if(res != ERROR_SUCCESS)
27*c2c66affSColin Finck-        return FALSE;
28*c2c66affSColin Finck-
29*c2c66affSColin Finck-    file_name = heap_alloc(size+sizeof(GECKO_FILE_NAME));
30*c2c66affSColin Finck-    res = RegQueryValueExA(hkey, "GeckoCabDir", NULL, &type, (PBYTE)file_name, &size);
31*c2c66affSColin Finck+    res = RegGetValueA(HKEY_CURRENT_USER, mshtml_keyA, "GeckoCabDir", RRF_RT_ANY, &type, (PBYTE)file_name, &size);
32*c2c66affSColin Finck     if(res == ERROR_MORE_DATA) {
33*c2c66affSColin Finck         file_name = heap_realloc(file_name, size+sizeof(GECKO_FILE_NAME));
34*c2c66affSColin Finck-        res = RegQueryValueExA(hkey, "GeckoCabDir", NULL, &type, (PBYTE)file_name, &size);
35*c2c66affSColin Finck+        res = RegGetValueA(HKEY_CURRENT_USER, mshtml_keyA, "GeckoCabDir", RRF_RT_ANY, &type, (PBYTE)file_name, &size);
36*c2c66affSColin Finck     }
37*c2c66affSColin Finck-    RegCloseKey(hkey);
38*c2c66affSColin Finck-    if(res != ERROR_SUCCESS || type != REG_SZ) {
39*c2c66affSColin Finck+
40*c2c66affSColin Finck+    if(res != ERROR_SUCCESS || (type != REG_SZ && type != REG_EXPAND_SZ)) {
41*c2c66affSColin Finck         heap_free(file_name);
42*c2c66affSColin Finck         return FALSE;
43*c2c66affSColin Finck     }
44