[PATCH] shdocvw: Implement URLSubRegQueryA

Detlef Riekenberg wine.dev at web.de
Sun Sep 28 15:21:45 CDT 2008


---
 dlls/shdocvw/shdocvw.spec   |    2 +-
 dlls/shdocvw/shdocvw_main.c |   31 +++++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/dlls/shdocvw/shdocvw.spec b/dlls/shdocvw/shdocvw.spec
index 209abd7..1cf297d 100644
--- a/dlls/shdocvw/shdocvw.spec
+++ b/dlls/shdocvw/shdocvw.spec
@@ -37,7 +37,7 @@
 148 stub -noname IEGetDisplayName
 149 stub -noname IEBindToObjectEx
 150 stub -noname _GetStdLocation
-151 stub -noname URLSubRegQueryA
+151 stdcall -noname URLSubRegQueryA(str str long ptr long long)
 152 stub -noname CShellUIHelper_CreateInstance2
 153 stub -noname IsURLChild
 158 stub -noname SHRestricted2A
diff --git a/dlls/shdocvw/shdocvw_main.c b/dlls/shdocvw/shdocvw_main.c
index 99af73b..37b094a 100644
--- a/dlls/shdocvw/shdocvw_main.c
+++ b/dlls/shdocvw/shdocvw_main.c
@@ -3,6 +3,7 @@
  *
  * Copyright 2001 John R. Sheets (for CodeWeavers)
  * Copyright 2004 Mike McCormack (for CodeWeavers)
+ * Copyright 2008 Detlef Riekenberg
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -31,6 +32,7 @@
 
 #include "winreg.h"
 #include "shlwapi.h"
+#include "wininet.h"
 
 #include "initguid.h"
 
@@ -268,3 +270,32 @@ DWORD WINAPI StopWatchAFORWARD(DWORD dwClass, LPCSTR lpszStr, DWORD dwUnknown,
         return p(dwClass, lpszStr, dwUnknown, dwMode, dwTimeStamp);
     return ERROR_CALL_NOT_IMPLEMENTED;
 }
+
+/******************************************************************
+ *  URLSubRegQueryA (SHDOCVW.151)
+ */
+HRESULT WINAPI URLSubRegQueryA(LPCSTR regpath, LPCSTR name, DWORD type,
+                               LPSTR out, DWORD outlen, DWORD unknown)
+{
+    CHAR buffer[INTERNET_MAX_URL_LENGTH];
+    DWORD len;
+    LONG res;
+
+    TRACE("(%s, %s, %d, %p, %d, %d)\n", debugstr_a(regpath), debugstr_a(name),
+            type, out, outlen, unknown);
+
+    if (!out) return S_OK;
+
+    len = sizeof(buffer);
+    res = SHRegGetUSValueA(regpath, name, NULL, buffer,  &len, FALSE, NULL, 0);
+    if (!res) {
+        lstrcpynA(out, buffer, outlen);
+        if (outlen > 0) {
+            out[min(outlen-1,len)] = '\0';
+        }
+        return S_OK;
+    }
+
+    return E_FAIL;
+}
+
-- 
1.5.6.3


--=-------------12226666568790042747--



More information about the wine-patches mailing list