mshtml: allow REG_EXPAND_SZ values for GeckoCabDir

Juan Lang juan.lang at gmail.com
Fri Feb 13 15:22:09 CST 2009


Hi Christoph,

-    /* @@ Wine registry key: HKCU\Software\Wine\MSHTML */
-    res = RegOpenKeyW(HKEY_CURRENT_USER, mshtml_keyW, &hkey);
-    if(res != ERROR_SUCCESS)
-        return FALSE;
-
     file_name = heap_alloc(size+sizeof(GECKO_FILE_NAME));
-    res = RegQueryValueExA(hkey, "GeckoCabDir", NULL, &type,
(PBYTE)file_name, &size);
+    /* @@ Wine registry key: HKCU\Software\Wine\MSHTML */
+    res = RegGetValueA(HKEY_CURRENT_USER, mshtml_keyA, "GeckoCabDir",
RRF_RT_ANY, &type, (PBYTE)file_name, &size);

This change is unrelated to the subject.  One change per patch, please.

+    if(res != ERROR_SUCCESS || (type != REG_SZ && type != REG_EXPAND_SZ)) {
         heap_free(file_name);
         return FALSE;
     }

If you're allowing REG_EXPAND_SZ, oughtn't you call
ExpandEnvironmentVariablesA as well?
--Juan



More information about the wine-devel mailing list