Detlef Riekenberg : urlmon: Implement IInternetZoneManager_SetZoneAttributes.

Alexandre Julliard julliard at winehq.org
Thu May 5 12:08:09 CDT 2011


Module: wine
Branch: master
Commit: 16e27e4d6ca037dc0795ee2cef86da1c88d25bd0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=16e27e4d6ca037dc0795ee2cef86da1c88d25bd0

Author: Detlef Riekenberg <wine.dev at web.de>
Date:   Wed May  4 19:42:20 2011 +0200

urlmon: Implement IInternetZoneManager_SetZoneAttributes.

---

 dlls/urlmon/sec_mgr.c |   38 ++++++++++++++++++++++++++++++++++++--
 1 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/dlls/urlmon/sec_mgr.c b/dlls/urlmon/sec_mgr.c
index 8246727..7b4bb35 100644
--- a/dlls/urlmon/sec_mgr.c
+++ b/dlls/urlmon/sec_mgr.c
@@ -1220,8 +1220,42 @@ static HRESULT WINAPI ZoneMgrImpl_SetZoneAttributes(IInternetZoneManagerEx2* ifa
                                                     DWORD dwZone,
                                                     ZONEATTRIBUTES* pZoneAttributes)
 {
-    FIXME("(%p)->(%08x %p) stub\n", iface, dwZone, pZoneAttributes);
-    return E_NOTIMPL;
+    ZoneMgrImpl* This = impl_from_IInternetZoneManagerEx2(iface);
+    HRESULT hr;
+    HKEY hcu;
+
+    TRACE("(%p)->(%d %p)\n", This, dwZone, pZoneAttributes);
+
+    if (!pZoneAttributes)
+        return E_INVALIDARG;
+
+    hr = open_zone_key(HKEY_CURRENT_USER, dwZone, &hcu);
+    if (FAILED(hr))
+        return S_OK;  /* IE6 returned E_FAIL here */
+
+    /* cbSize is ignored */
+    RegSetValueExW(hcu, displaynameW, 0, REG_SZ, (LPBYTE) pZoneAttributes->szDisplayName,
+                    (lstrlenW(pZoneAttributes->szDisplayName)+1)* sizeof(WCHAR));
+
+    RegSetValueExW(hcu, descriptionW, 0, REG_SZ, (LPBYTE) pZoneAttributes->szDescription,
+                    (lstrlenW(pZoneAttributes->szDescription)+1)* sizeof(WCHAR));
+
+    RegSetValueExW(hcu, iconW, 0, REG_SZ, (LPBYTE) pZoneAttributes->szIconPath,
+                    (lstrlenW(pZoneAttributes->szIconPath)+1)* sizeof(WCHAR));
+
+    RegSetValueExW(hcu, minlevelW, 0, REG_DWORD,
+                    (const BYTE*) &pZoneAttributes->dwTemplateMinLevel, sizeof(DWORD));
+
+    RegSetValueExW(hcu, currentlevelW, 0, REG_DWORD,
+                    (const BYTE*) &pZoneAttributes->dwTemplateCurrentLevel, sizeof(DWORD));
+
+    RegSetValueExW(hcu, recommendedlevelW, 0, REG_DWORD,
+                    (const BYTE*) &pZoneAttributes->dwTemplateRecommended, sizeof(DWORD));
+
+    RegSetValueExW(hcu, flagsW, 0, REG_DWORD, (const BYTE*) &pZoneAttributes->dwFlags, sizeof(DWORD));
+    RegCloseKey(hcu);
+    return S_OK;
+
 }
 
 /********************************************************************




More information about the wine-cvs mailing list