https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0f2cb5abc7a5a7a75dbd3…
commit 0f2cb5abc7a5a7a75dbd36a18e2c4949ee12f9a7
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Sat Oct 19 23:56:19 2019 +0200
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Oct 20 17:10:11 2019 +0200
[SHELL32_APITEST] Show that the default data object does not have a preferred drop
effect
---
modules/rostests/apitests/shell32/CIDLData.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/modules/rostests/apitests/shell32/CIDLData.cpp
b/modules/rostests/apitests/shell32/CIDLData.cpp
index 8169666977b..f64fb3f7178 100644
--- a/modules/rostests/apitests/shell32/CIDLData.cpp
+++ b/modules/rostests/apitests/shell32/CIDLData.cpp
@@ -258,6 +258,17 @@ static void TestDefaultFormat(PCIDLIST_ABSOLUTE pidlFolder, UINT
cidl, PCUIDLIST
if (SUCCEEDED(hr))
ReleaseStgMedium(&medium);
}
+
+ // Not registered
+ CLIPFORMAT Format = RegisterClipboardFormatW(CFSTR_PREFERREDDROPEFFECTW);
+ FORMATETC formatetc = { Format, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
+ STGMEDIUM medium;
+
+ hr = spDataObj->GetData(&formatetc, &medium);
+ if (g_WinVersion < _WIN32_WINNT_VISTA)
+ ok_hex(hr, E_INVALIDARG);
+ else
+ ok_hex(hr, DV_E_FORMATETC);
}