[PATCH 2/2] [shdocvw] Add stub DoOrganizeFavDlg (try 3)

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

[PATCH 2/2] [shdocvw] Add stub DoOrganizeFavDlg (try 3)

Vijay Kiran Kamuju
For bug #44270

Changes from try2:
update the patch file correctly
Changes from try1:
rename variables and use heap_alloc

Signed-off-by: Vijay Kiran Kamuju <[hidden email]>
---
 dlls/shdocvw/shdocvw.spec   |  4 ++--
 dlls/shdocvw/shdocvw_main.c | 29 +++++++++++++++++++++++++++++
 2 files changed, 31 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..52c622c6099f 100644
--- a/dlls/shdocvw/shdocvw_main.c
+++ b/dlls/shdocvw/shdocvw_main.c
@@ -560,3 +560,32 @@ BOOL WINAPI DoFileDownload(LPWSTR filename)
     FIXME("(%s) stub\n", debugstr_w(filename));
     return FALSE;
 }
+
+/******************************************************************
+ * DoOrganizeFavDlgW (SHDOCVW.@)
+ */
+BOOL WINAPI DoOrganizeFavDlgW(HWND hwnd, LPCWSTR initDir)
+{
+    FIXME("(%p %s) stub\n", hwnd, debugstr_w(initDir));
+    return FALSE;
+}
+
+/******************************************************************
+ * DoOrganizeFavDlg (SHDOCVW.@)
+ */
+BOOL WINAPI DoOrganizeFavDlg(HWND hwnd, LPCSTR initDir)
+{
+    LPWSTR initDirW = NULL;
+    BOOL res;
+
+    TRACE("(%p %s)\n", hwnd, debugstr_a(initDir));
+
+    if (initDir) {
+        DWORD len = MultiByteToWideChar(CP_ACP, 0, initDir, -1, NULL, 0);
+        initDirW = heap_alloc(len * sizeof(WCHAR));
+        MultiByteToWideChar(CP_ACP, 0, initDir, -1, initDirW, len);
+    }
+    res = DoOrganizeFavDlgW(hwnd, initDirW);
+    heap_free(initDirW);
+    return res;
+}
--
2.15.1