shdocvw: Implement URLSubRegQueryA.
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..c9deff1 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,28 @@
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);
+ return S_OK;
+ }
+
+ return E_FAIL;
+}