/** * Test QueryGetData() enumerator for the presence of CFSTR_SHELLIDLIST * but the absence of CFSTR_FILEDESCRIPTOR and CFSTR_FILECONTENTS. * * Format-limited version of _testQueryFormats() in DataObjectTests.h. */ void _testCDataObjectQueryFormats(com_ptr<IDataObject> data_object) { // Test CFSTR_SHELLIDLIST (PIDL array) format succeeds CFormatEtc fetcShellIdList(CFSTR_SHELLIDLIST); BOOST_REQUIRE_OK(data_object->QueryGetData(&fetcShellIdList)); // Test CFSTR_FILEDESCRIPTOR (FILEGROUPDESCRIPTOR) format fails CFormatEtc fetcDescriptor(CFSTR_FILEDESCRIPTOR); BOOST_CHECK(data_object->QueryGetData(&fetcDescriptor) == S_FALSE); // Test CFSTR_FILECONTENTS (IStream) format fails CFormatEtc fetcContents(CFSTR_FILECONTENTS); BOOST_CHECK(data_object->QueryGetData(&fetcContents) == S_FALSE); }