17 SFGAO_CANDELETE | SFGAO_READONLY | SFGAO_STREAM | SFGAO_FOLDER;
44 CComPtr<IShellFolder> spDesktop, spResult;
60 STGMEDIUM medium = {};
76 winetest_ok(
data[0] == expect_mask,
"Unexpected mask, got 0x%lx, expected 0x%lx\n",
data[0], expect_mask);
77 winetest_ok(
data[1] == expect_attr,
"Unexpected attr, got 0x%lx, expected 0x%lx\n",
data[1], expect_attr);
78 winetest_ok(
data[2] == expect_items,
"Unexpected item count, got %lu, expected %u\n",
data[2], expect_items);
89#define ok_attributes (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : ok_attributes_
90#define ok_hr_ret(x, y) ok_hr(x, y); if (x != y) return
121 ok(spPath !=
nullptr,
"Unable to create pidl from %S\n",
Buffer);
122 if (spPath ==
nullptr)
128 CComPtr<IShellFolder> spFolder;
133 hr = spFolder->GetAttributesOf(1, &
child, &attributes);
146 CComPtr<IDataObject> spDataObject;
163 dwAttributeMask = SFGAO_HASPROPSHEET;
175 TmpFile TmpFile1, TmpFile2, TmpFile3;
177 CComHeapPtr<ITEMIDLIST> pidl_tmpfolder;
178 CComHeapPtr<ITEMIDLIST> pidl1, pidl2, pidl3;
192 TmpFile1.
Create(TempFolder);
193 TmpFile2.
Create(TempFolder);
194 TmpFile3.
Create(TempFolder);
202 CComPtr<IShellFolder> spFolder =
_BindToObject(pidl_tmpfolder);
203 ok(!!spFolder,
"Unable to bind to tmp folder\n");
221 hr = spFolder->GetAttributesOf(1,
items, &attributes_first);
224 hr = spFolder->GetAttributesOf(2,
items, &attributes2);
227 hr = spFolder->GetAttributesOf(3,
items, &attributes3);
230 hr = spFolder->GetAttributesOf(1,
items + 2, &attributes_last);
251 ok(attributes_first & SFGAO_STREAM,
"Expected SFGAO_STREAM on attributes_first (0x%lx)\n", attributes_first);
252 ok(!(attributes2 & SFGAO_STREAM),
"Expected no SFGAO_STREAM on attributes2 (0x%lx)\n", attributes2);
253 ok(!(attributes3 & SFGAO_STREAM),
"Expected no SFGAO_STREAM on attributes3 (0x%lx)\n", attributes3);
254 ok(attributes_last & SFGAO_STREAM,
"Expected SFGAO_STREAM on attributes_last (0x%lx)\n", attributes_last);
257 ok(!(attributes_first & SFGAO_READONLY),
"Expected no SFGAO_READONLY on attributes_first (0x%lx)\n", attributes_first);
258 ok(!(attributes2 & SFGAO_READONLY),
"Expected no SFGAO_READONLY on attributes2 (0x%lx)\n", attributes2);
259 ok(!(attributes3 & SFGAO_READONLY),
"Expected no SFGAO_READONLY on attributes3 (0x%lx)\n", attributes3);
260 ok(attributes_last & SFGAO_READONLY,
"Expected SFGAO_READONLY on attributes_last (0x%lx)\n", attributes_last);
265 CComPtr<IDataObject> spDataObject;
278 CComPtr<IDataObject> spDataObject;
291 CComPtr<IDataObject> spDataObject;
304 CComPtr<IDataObject> spDataObject;
#define ok_hr(status, expected)
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
static const DWORD dwDefaultAttributeMask
static void test_SpecialCases()
CComPtr< IShellFolder > _BindToObject(PCUIDLIST_ABSOLUTE pidl)
static void test_AttributesRegistration()
static const DWORD dwDefaultAttributeMask_WS03
static void test_MultipleFiles()
static void ok_attributes_(IDataObject *pDataObject, HRESULT expect_hr, DWORD expect_mask, DWORD expect_attr, UINT expect_items)
static CLIPFORMAT g_DataObjectAttributes
#define ok_int(expression, result)
#define FILE_ATTRIBUTE_NORMAL
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes)
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
WCHAR *WINAPI PathFindFileNameW(const WCHAR *path)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
#define FAILED_UNEXPECTEDLY
static IShellFolder IShellItem **static IBindCtx LPITEMIDLIST SFGAOF
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
SIZE_T NTAPI GlobalSize(HGLOBAL hMem)
HRESULT GetData([in, unique] FORMATETC *pformatetcIn, [out] STGMEDIUM *pmedium)
static ERESOURCE GlobalLock
void __cdecl winetest_ok(int condition, const char *msg,...) __WINE_PRINTF_ATTR(2
#define expect_hr(expected, got)
#define FILE_ATTRIBUTE_READONLY
@ COINIT_APARTMENTTHREADED
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST pidl)
HRESULT WINAPI SHParseDisplayName(LPCWSTR pszName, IBindCtx *pbc, LPITEMIDLIST *ppidl, SFGAOF sfgaoIn, SFGAOF *psfgaoOut)
BOOL WINAPI ILRemoveLastID(LPITEMIDLIST pidl)
HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast)
LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path)
#define _WIN32_WINNT_VISTA
HRESULT WINAPI CIDLData_CreateFromIDArray(PCIDLIST_ABSOLUTE pidlFolder, UINT cpidlFiles, PCUIDLIST_RELATIVE_ARRAY lppidlFiles, LPDATAOBJECT *ppdataObject)
EXTERN_C HRESULT WINAPI SHGetAttributesFromDataObject(IDataObject *pDataObject, DWORD dwAttributeMask, DWORD *pdwAttributes, UINT *pcItems)
const ITEMIDLIST_ABSOLUTE UNALIGNED * PCUIDLIST_ABSOLUTE
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
void Create(LPCWSTR Folder)
UINT WINAPI RegisterClipboardFormatW(_In_ LPCWSTR)
#define IID_PPV_ARG(Itype, ppType)