https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b2d2e3433b74ff37c4de2…
commit b2d2e3433b74ff37c4de2f8d27d85fc7c0700235
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Sun Aug 19 01:36:47 2018 +0900
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sat Aug 18 18:36:47 2018 +0200
[CLIPBRD] Clipbrd program should accept the quoted file path (#638)
---
base/applications/clipbrd/clipbrd.c | 6 ++++--
base/applications/clipbrd/precomp.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/base/applications/clipbrd/clipbrd.c b/base/applications/clipbrd/clipbrd.c
index 280cc6f78e..aa14d44cdc 100644
--- a/base/applications/clipbrd/clipbrd.c
+++ b/base/applications/clipbrd/clipbrd.c
@@ -409,6 +409,8 @@ static LRESULT WINAPI MainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam,
LPARAM lP
UpdateDisplayMenu();
SetDisplayFormat(0);
+
+ DragAcceptFiles(hWnd, TRUE);
break;
}
@@ -733,8 +735,8 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPWSTR lpCmdLi
}
/* If the user provided a path to a clipboard data file, try to open it */
- if (lpCmdLine != NULL && *lpCmdLine)
- LoadClipboardDataFromFile(lpCmdLine);
+ if (__argc >= 2)
+ LoadClipboardDataFromFile(__wargv[1]);
while (GetMessageW(&msg, 0, 0, 0))
{
diff --git a/base/applications/clipbrd/precomp.h b/base/applications/clipbrd/precomp.h
index 7a04b962c4..e5dd1781ab 100644
--- a/base/applications/clipbrd/precomp.h
+++ b/base/applications/clipbrd/precomp.h
@@ -25,6 +25,7 @@
#include <htmlhelp.h>
#include <commdlg.h>
#include <winnls.h>
+#include <stdlib.h>
#include "resources.h"
#include "cliputils.h"