[SHELL32_APITEST] Show that the default data object does not have a preferred drop...
authorMark Jansen <mark.jansen@reactos.org>
Sat, 19 Oct 2019 21:56:19 +0000 (23:56 +0200)
committerMark Jansen <mark.jansen@reactos.org>
Sun, 20 Oct 2019 15:10:11 +0000 (17:10 +0200)
modules/rostests/apitests/shell32/CIDLData.cpp

index 8169666..f64fb3f 100644 (file)
@@ -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);
 }