147{
148 CComPtr<IDataObject> spDataObj;
150
153 return;
154
155 CComPtr<IEnumFORMATETC> pEnumFmt;
156 hr = spDataObj->EnumFormatEtc(DATADIR_GET, &pEnumFmt);
157
160 return;
161
167 };
168
172 {
173 char szGot[512], szExpected[512];
177 {
181 }
182
184 ok(
fmt.dwAspect == DVASPECT_CONTENT,
"Got 0x%lu, expected 0x%d for [%u].dwAspect\n",
fmt.dwAspect, DVASPECT_CONTENT,
Count);
185 ok(
fmt.lindex == -1,
"Got 0x%lx, expected 0x%x for [%u].lindex\n",
fmt.lindex, -1,
Count);
186 ok(
fmt.tymed == TYMED_HGLOBAL,
"Got 0x%lu, expected 0x%d for [%u].tymed\n",
fmt.tymed, TYMED_HGLOBAL,
Count);
187
189 }
191 ULONG ExpectedCount = 4;
194
201 };
202
204
208 return;
209
213 return;
214
218 return;
219
220
221
223 {
224 STGMEDIUM medium = {0};
225 FORMATETC etc = { (CLIPFORMAT)
Expected[
Count],
NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
226 char szExpected[512];
227
229 hr = spDataObj->GetData(&etc, &medium);
230 HRESULT hr2 = spDataObj->QueryGetData(&etc);
232
233 if (
Count < ExpectedCount)
234 {
236 ok(medium.tymed == TYMED_HGLOBAL,
"0x%lx (0x%x(%s))\n", medium.tymed,
Expected[
Count], szExpected);
237 if (
hr ==
S_OK && medium.tymed == TYMED_HGLOBAL)
238 {
241 TestFormats[
Count](
pData,
Size, ExpectRoot, ExpectItem1, ExpectItem2);
243 }
244 }
245 else
246 {
247
249
250
251 }
252
255 }
256
258 FORMATETC formatetc = {
Format,
NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
259 STGMEDIUM medium;
260
261 hr = spDataObj->GetData(&formatetc, &medium);
264 else
266}
static void TestFilenameW(PVOID pData, SIZE_T Size, LPCWSTR ExpectRoot, LPCWSTR ExpectPath1, LPCWSTR ExpectPath2)
static void TestFilenameA(PVOID pData, SIZE_T Size, LPCWSTR ExpectRoot, LPCWSTR ExpectPath1, LPCWSTR ExpectPath2)
static void TestHDROP(PVOID pData, SIZE_T Size, LPCWSTR ExpectRoot, LPCWSTR ExpectPath1, LPCWSTR ExpectPath2)
static void TestHIDA(PVOID pData, SIZE_T Size, LPCWSTR ExpectRoot, LPCWSTR ExpectPath1, LPCWSTR ExpectPath2)
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
HRESULT WINAPI SHGetFolderPathW(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath)
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
SIZE_T NTAPI GlobalSize(HGLOBAL hMem)
static const WCHAR CFSTR_PREFERREDDROPEFFECTW[]
#define CFSTR_SHELLIDLISTA
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
int WINAPI GetClipboardFormatNameA(_In_ UINT format, _Out_writes_(cchMaxCount) LPSTR lpszFormatName, _In_ int cchMaxCount)
UINT WINAPI RegisterClipboardFormatW(_In_ LPCWSTR)
UINT WINAPI RegisterClipboardFormatA(_In_ LPCSTR)