142{
143 CComPtr<IDataObject> spDataObj;
145
148 return;
149
150 CComPtr<IEnumFORMATETC> pEnumFmt;
151 hr = spDataObj->EnumFormatEtc(DATADIR_GET, &pEnumFmt);
152
155 return;
156
162 };
163
167 {
168 char szGot[512], szExpected[512];
172 {
176 }
177
179 ok(
fmt.dwAspect == DVASPECT_CONTENT,
"Got 0x%lu, expected 0x%d for [%u].dwAspect\n",
fmt.dwAspect, DVASPECT_CONTENT,
Count);
180 ok(
fmt.lindex == -1,
"Got 0x%lx, expected 0x%x for [%u].lindex\n",
fmt.lindex, -1,
Count);
181 ok(
fmt.tymed == TYMED_HGLOBAL,
"Got 0x%lu, expected 0x%d for [%u].tymed\n",
fmt.tymed, TYMED_HGLOBAL,
Count);
182
184 }
189
196 };
197
199
203 return;
204
208 return;
209
213 return;
214
215
216
218 {
219 STGMEDIUM medium = {0};
220 FORMATETC etc = { (CLIPFORMAT)
Expected[
Count],
NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
221 char szExpected[512];
222
224 hr = spDataObj->GetData(&etc, &medium);
225 HRESULT hr2 = spDataObj->QueryGetData(&etc);
227
228 if (
Count < ExpectedCount)
229 {
231 ok(medium.tymed == TYMED_HGLOBAL,
"0x%lx (0x%x(%s))\n", medium.tymed,
Expected[
Count], szExpected);
232 if (
hr ==
S_OK && medium.tymed == TYMED_HGLOBAL)
233 {
236 TestFormats[
Count](
pData,
Size, ExpectRoot, ExpectItem1, ExpectItem2);
238 }
239 }
240 else
241 {
244 else
246 }
247
250 }
251
252
254 FORMATETC formatetc = {
Format,
NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
255 STGMEDIUM medium;
256
257 hr = spDataObj->GetData(&formatetc, &medium);
260 else
262}
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)
#define _WIN32_WINNT_WIN8
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)