[PATCH 2/2] [shdocvw] Add stub DoOrganizeFavDlg

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 2/2] [shdocvw] Add stub DoOrganizeFavDlg

Vijay Kiran Kamuju
For bug #44270

Signed-off-by: Vijay Kiran Kamuju <[hidden email]>
---
 dlls/shdocvw/shdocvw.spec   |  4 ++--
 dlls/shdocvw/shdocvw_main.c | 27 +++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/dlls/shdocvw/shdocvw.spec b/dlls/shdocvw/shdocvw.spec
index 0d581b26d2fa..485d1608dbab 100644
--- a/dlls/shdocvw/shdocvw.spec
+++ b/dlls/shdocvw/shdocvw.spec
@@ -113,8 +113,8 @@
 @ stub DoAddToFavDlgW
 @ stdcall DoFileDownload(wstr)
 @ stub DoFileDownloadEx
-@ stub DoOrganizeFavDlg
-@ stub DoOrganizeFavDlgW
+@ stdcall DoOrganizeFavDlg(long str)
+@ stdcall DoOrganizeFavDlgW(long wstr)
 @ stub DoPrivacyDlg
 @ stub HlinkFrameNavigate
 @ stub HlinkFrameNavigateNHL
diff --git a/dlls/shdocvw/shdocvw_main.c b/dlls/shdocvw/shdocvw_main.c
index 5d89f77e919f..151aac039f1d 100644
--- a/dlls/shdocvw/shdocvw_main.c
+++ b/dlls/shdocvw/shdocvw_main.c
@@ -560,3 +560,30 @@ BOOL WINAPI DoFileDownload(LPWSTR filename)
     FIXME("(%s) stub\n", debugstr_w(filename));
     return FALSE;
 }
+
+/******************************************************************
+ * DoOrganizeFavDlgW (SHDOCVW.@)
+ */
+BOOL WINAPI DoOrganizeFavDlgW(HWND handle, LPCWSTR path)
+{
+    FIXME("(%p %s) stub\n", handle, debugstr_w(path));
+    return FALSE;
+}
+
+/******************************************************************
+ * DoOrganizeFavDlg (SHDOCVW.@)
+ */
+BOOL WINAPI DoOrganizeFavDlg(HWND handle, LPCSTR path)
+{
+    LPWSTR pathW = NULL;
+    DWORD res;
+
+    if (pathW) {
+        DWORD len = MultiByteToWideChar(CP_ACP, 0, path, -1, NULL, 0);
+        pathW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
+        MultiByteToWideChar(CP_ACP, 0, path, -1, pathW, len);
+    }
+    res = DoOrganizeFavDlgW(handle, pathW);
+    heap_free(pathW);
+    return res;
+}
--
2.15.1