145{
146 CComPtr<IDataObject> spDataObj;
148
151 return;
152
153 CComPtr<IEnumFORMATETC> pEnumFmt;
154 hr = spDataObj->EnumFormatEtc(DATADIR_GET, &pEnumFmt);
155
158 return;
159
165 };
166
170 {
171 char szGot[512], szExpected[512];
175 {
179 }
180
182 ok(
fmt.dwAspect == DVASPECT_CONTENT,
"Got 0x%lu, expected 0x%d for [%u].dwAspect\n",
fmt.dwAspect, DVASPECT_CONTENT,
Count);
183 ok(
fmt.lindex == -1,
"Got 0x%lx, expected 0x%x for [%u].lindex\n",
fmt.lindex, -1,
Count);
184 ok(
fmt.tymed == TYMED_HGLOBAL,
"Got 0x%lu, expected 0x%d for [%u].tymed\n",
fmt.tymed, TYMED_HGLOBAL,
Count);
185
187 }
192
199 };
200
202
206 return;
207
211 return;
212
216 return;
217
218
219
221 {
222 STGMEDIUM medium = {0};
223 FORMATETC etc = { (CLIPFORMAT)
Expected[
Count],
NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
224 char szExpected[512];
225
227 hr = spDataObj->GetData(&etc, &medium);
228 HRESULT hr2 = spDataObj->QueryGetData(&etc);
230
231 if (
Count < ExpectedCount)
232 {
234 ok(medium.tymed == TYMED_HGLOBAL,
"0x%lx (0x%x(%s))\n", medium.tymed,
Expected[
Count], szExpected);
235 if (
hr ==
S_OK && medium.tymed == TYMED_HGLOBAL)
236 {
239 TestFormats[
Count](
pData,
Size, ExpectRoot, ExpectItem1, ExpectItem2);
241 }
242 }
243 else
244 {
247 else
249 }
250
253 }
254
256 FORMATETC formatetc = {
Format,
NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
257 STGMEDIUM medium;
258
259 hr = spDataObj->GetData(&formatetc, &medium);
262 else
264}
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)