[PATCH] urlmon: Implement _CreateZoneEnumerator, _GetZoneAt and _DestroyZoneEnumerator

Detlef Riekenberg wine.dev at web.de
Sun Jun 21 17:57:40 CDT 2009


---
 dlls/urlmon/sec_mgr.c |   35 +++++++++++++++++++++++++++++------
 1 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/dlls/urlmon/sec_mgr.c b/dlls/urlmon/sec_mgr.c
index 19286b1..22378b3 100644
--- a/dlls/urlmon/sec_mgr.c
+++ b/dlls/urlmon/sec_mgr.c
@@ -29,6 +29,9 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
 
+/* The registry has Zone "0" upto Zone "4" since IE4 */
+#define NUMBER_OF_ZONES 5
+
 static const WCHAR currentlevelW[] = {'C','u','r','r','e','n','t','L','e','v','e','l',0};
 static const WCHAR descriptionW[] = {'D','e','s','c','r','i','p','t','i','o','n',0};
 static const WCHAR displaynameW[] = {'D','i','s','p','l','a','y','N','a','m','e',0};
@@ -876,8 +879,15 @@ static HRESULT WINAPI ZoneMgrImpl_CreateZoneEnumerator(IInternetZoneManager* ifa
                                                        DWORD* pdwCount,
                                                        DWORD dwFlags)
 {
-    FIXME("(%p)->(%p %p %08x) stub\n", iface, pdwEnum, pdwCount, dwFlags);
-    return E_NOTIMPL;
+    ZoneMgrImpl* This = (ZoneMgrImpl*)iface;
+
+    TRACE("(%p)->(%p, %p, 0x%08x)\n", This, pdwEnum, pdwCount, dwFlags);
+    if (!pdwEnum || !pdwCount || (dwFlags != 0))
+        return E_INVALIDARG;
+
+    *pdwCount = NUMBER_OF_ZONES;
+    *pdwEnum = 0x7700cafe;
+    return S_OK;
 }
 
 /********************************************************************
@@ -888,8 +898,15 @@ static HRESULT WINAPI ZoneMgrImpl_GetZoneAt(IInternetZoneManager* iface,
                                             DWORD dwIndex,
                                             DWORD* pdwZone)
 {
-    FIXME("(%p)->(%08x %08x %p) stub\n", iface, dwEnum, dwIndex, pdwZone);
-    return E_NOTIMPL;
+    ZoneMgrImpl* This = (ZoneMgrImpl*)iface;
+
+    TRACE("(%p)->(0x%08x, %d, %p)\n", This, dwEnum, dwIndex, pdwZone);
+    if ((dwEnum == 0x7700cafe) && (dwIndex < NUMBER_OF_ZONES)) {
+
+        *pdwZone = dwIndex;
+        return S_OK;
+    }
+    return E_INVALIDARG;
 }
 
 /********************************************************************
@@ -898,8 +915,14 @@ static HRESULT WINAPI ZoneMgrImpl_GetZoneAt(IInternetZoneManager* iface,
 static HRESULT WINAPI ZoneMgrImpl_DestroyZoneEnumerator(IInternetZoneManager* iface,
                                                         DWORD dwEnum)
 {
-    FIXME("(%p)->(%08x) stub\n", iface, dwEnum);
-    return E_NOTIMPL;
+    ZoneMgrImpl* This = (ZoneMgrImpl*)iface;
+
+    TRACE("(%p)->(0x%08x)\n", This, dwEnum);
+    /* we don't care about DestroyZoneEnumerator twice */
+    if (dwEnum == 0x7700cafe)
+        return S_OK;
+
+    return E_INVALIDARG;
 }
 
 /********************************************************************
-- 
1.5.4.3


--=-3fXZOBS2FRZAhCjuTWcP--




More information about the wine-patches mailing list