22#define NONAMELESSUNION
33DEFINE_GUID(FMTID_Test,0x12345678,0x1234,0x1234,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12);
34DEFINE_GUID(FMTID_NotExisting, 0x12345678,0x1234,0x1234,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x13);
35DEFINE_GUID(CLSID_ClassMoniker, 0x0000031a,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
37#define DEFINE_EXPECT(func) \
38 static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
40#define SET_EXPECT(func) \
41 expect_ ## func = TRUE
43#define CHECK_EXPECT2(func) \
45 ok(expect_ ##func, "unexpected call " #func "\n"); \
46 called_ ## func = TRUE; \
49#define CHECK_EXPECT(func) \
51 CHECK_EXPECT2(func); \
52 expect_ ## func = FALSE; \
55#define CHECK_CALLED(func) \
57 ok(called_ ## func, "expected " #func "\n"); \
58 expect_ ## func = called_ ## func = FALSE; \
76 ULONG,
const PROPSPEC*, PROPVARIANT*);
89 pSHCreateQueryCancelAutoPlayMoniker = (
void*)
GetProcAddress(
hmod,
"SHCreateQueryCancelAutoPlayMoniker");
96 ok(0,
"unexpected call\n");
102 ok(0,
"unexpected call\n");
113 const PROPSPEC *rgpspec, PROPVARIANT *rgpropvar)
118 ok(rgpspec !=
NULL,
"rgpspec = NULL\n");
119 ok(rgpropvar !=
NULL,
"rgpropvar = NULL\n");
121 ok(rgpspec[0].ulKind == PRSPEC_PROPID,
"rgpspec[0].ulKind = %d\n", rgpspec[0].ulKind);
122 ok(rgpspec[0].propid ==
PID_CODEPAGE,
"rgpspec[0].propid = %d\n", rgpspec[0].propid);
124 rgpropvar[0].vt =
VT_I2;
125 rgpropvar[0].iVal = 1234;
129 ok(cpspec == 10,
"cpspec = %u\n", cpspec);
130 ok(rgpspec == (
void*)0xdeadbeef,
"rgpspec = %p\n", rgpspec);
131 ok(rgpropvar !=
NULL,
"rgpropvar = NULL\n");
133 ok(rgpropvar[0].
vt==0 ||
broken(rgpropvar[0].
vt==
VT_BSTR),
"rgpropvar[0].vt = %d\n", rgpropvar[0].
vt);
136 rgpropvar[0].bstrVal = (
void*)0xdeadbeef;
138 rgpropvar[1].pszVal = (
void*)0xdeadbeef;
140 rgpropvar[2].pcVal = (
void*)0xdeadbeef;
142 rgpropvar[3].pvarVal = (
void*)0xdeadbeef;
149 const PROPSPEC *rgpspec,
const PROPVARIANT *rgpropvar,
154 ok(cpspec == 20,
"cpspec = %d\n", cpspec);
155 ok(rgpspec == (
void*)0xdeadbeef,
"rgpspec = %p\n", rgpspec);
156 ok(rgpropvar == (
void*)0xdeadbeef,
"rgpropvar = %p\n", rgpspec);
162 const PROPSPEC *rgpspec)
164 ok(0,
"unexpected call\n");
171 ok(0,
"unexpected call\n");
178 ok(0,
"unexpected call\n");
185 ok(0,
"unexpected call\n");
191 ok(0,
"unexpected call\n");
197 ok(0,
"unexpected call\n");
203 ok(0,
"unexpected call\n");
210 ok(0,
"unexpected call\n");
216 ok(0,
"unexpected call\n");
224 memset(statpsstg, 0,
sizeof(STATPROPSETSTG));
225 memcpy(&statpsstg->fmtid, &FMTID_Test,
sizeof(
FMTID));
226 statpsstg->grfFlags = PROPSETFLAG_ANSI;
253 ok(0,
"unexpected call\n");
259 ok(0,
"unexpected call\n");
265 ok(0,
"unexpected call\n");
275 "Incorrect rfmtid value\n");
276 ok(pclsid ==
NULL,
"pclsid != NULL\n");
277 ok(grfFlags == PROPSETFLAG_ANSI,
"grfFlags = %x\n", grfFlags);
278 ok(grfMode ==
STGM_READ,
"grfMode = %x\n", grfMode);
290 ok(grfMode ==
STGM_READ,
"grfMode = %x\n", grfMode);
303 ok(
IsEqualGUID(rfmtid, &FMTID_Test),
"wrong rfmtid value\n");
308 IEnumSTATPROPSETSTG **ppenum)
310 ok(0,
"unexpected call\n");
330 PROPVARIANT
read[10];
333 if(!pSHPropStgCreate || !pSHPropStgReadMultiple || !pSHPropStgWriteMultiple) {
334 win_skip(
"SHPropStg* functions are missing\n");
340 pSHPropStgCreate(
NULL, &FMTID_Test,
NULL, PROPSETFLAG_DEFAULT,
425 read[0].bstrVal = (
void*)0xdeadbeef;
429 hres = pSHPropStgReadMultiple(property_storage, 0, 10, (
void*)0xdeadbeef,
read);
437 hres = pSHPropStgReadMultiple(property_storage, 1251, 10, (
void*)0xdeadbeef,
read);
455 IClassActivator_AddRef(iface);
518 ok(0,
"unexpected call\n");
524 ok(0,
"unexpected call\n");
530 ok(0,
"unexpected call\n");
536 ok(0,
"unexpected call\n");
542 ok(0,
"unexpected call\n");
553 ok(pbc !=
NULL,
"got %p\n", pbc);
554 ok(moniker_to_left ==
NULL,
"got %p\n", moniker_to_left);
572 ok(0,
"unexpected call\n");
578 DWORD dwReduceHowFar,
582 ok(0,
"unexpected call\n");
588 BOOL fOnlyIfNotGeneric,
591 ok(0,
"unexpected call\n");
597 ok(0,
"unexpected call\n");
603 ok(0,
"unexpected call\n");
609 ok(0,
"unexpected call\n");
618 ok(0,
"unexpected call\n");
627 ok(0,
"unexpected call\n");
633 ok(0,
"unexpected call\n");
639 ok(0,
"unexpected call\n");
645 ok(0,
"unexpected call\n");
654 ok(0,
"unexpected call\n");
665 ok(0,
"unexpected call\n");
671 ok(0,
"unexpected call\n");
713 if (!pSHCreateQueryCancelAutoPlayMoniker)
715 win_skip(
"SHCreateQueryCancelAutoPlayMoniker is not available, skipping tests.\n");
719 hr = pSHCreateQueryCancelAutoPlayMoniker(
NULL);
722 hr = pSHCreateQueryCancelAutoPlayMoniker(&mon);
726 hr = IMoniker_IsSystemMoniker(mon, &sys);
728 ok(sys == MKSYS_CLASSMONIKER,
"got %d\n", sys);
731 hr = IMoniker_GetClassID(mon, &
clsid);
740 hr = IMoniker_BindToObject(mon, ctxt, &
test_moniker, &IID_IQueryCancelAutoPlay, (
void**)&unk);
742 IBindCtx_Release(ctxt);
747 IMoniker_Release(mon);
750#define WM_EXPECTED_VALUE WM_APP
751#define DROPTEST_FILENAME "c:\\wintest.bin"
769 HDROP hDrop = (HDROP)
wparam;
775 ok(
num == 1,
"expected 1, got %u\n",
num);
777 ok(
num == 1,
"expected 1, got %u\n",
num);
783 ok(
pt.x == 10,
"expected 10, got %d\n",
pt.x);
784 ok(
pt.y == 20,
"expected 20, got %d\n",
pt.y);
800 memset(&cls, 0,
sizeof(cls));
813 ok(
r,
"got %d\n",
r);
821 ok(
r,
"got %d\n",
r);
828 ok(0,
"unexpected return value, got %d\n",
r);
860 pDrop->
fNC = non_client_flag;
869 ok(
r,
"got %d\n",
r);
872 ok(
r,
"got %d\n",
r);
875 ok(
r,
"got %d\n",
r);
883#undef WM_EXPECTED_VALUE
884#undef DROPTEST_FILENAME
888 static const WCHAR session_format[] = {
889 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
890 'W',
'i',
'n',
'd',
'o',
'w',
's',
'\\',
'C',
'u',
'r',
'r',
'e',
'n',
't',
'V',
'e',
'r',
's',
'i',
'o',
'n',
'\\',
891 'E',
'x',
'p',
'l',
'o',
'r',
'e',
'r',
'\\',
'S',
'e',
's',
's',
'i',
'o',
'n',
'I',
'n',
'f',
'o',
'\\',
'%',
'u',0};
898 if (!pSHCreateSessionKey)
900 win_skip(
"SHCreateSessionKey is not implemented\n");
907 hkey = (
HKEY)0xdeadbeef;
908 hr = pSHCreateSessionKey(0, &hkey);
910 ok(hkey ==
NULL,
"got %p\n", hkey);
917 ok(hkey != hkey2,
"got %p, %p\n", hkey, hkey2);
928 ok(!
ret,
"key not found\n");
940 ok(
hr ==
S_OK,
"Failed to create IDropTargetHelper, %#x\n",
hr);
942 hr = IDropTargetHelper_QueryInterface(
target, &IID_IDragSourceHelper, (
void **)&dragsource);
944 IDragSourceHelper_Release(dragsource);
946 IDropTargetHelper_Release(
target);
956 ok(
hr ==
S_OK,
"CoInitialize failed (0x%08x)\n",
hr);
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
BOOL Delete(LPCTSTR ServiceName)
#define RegCloseKey(hKey)
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
#define GetProcAddress(x, y)
#define MultiByteToWideChar
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
BOOL WINAPI ProcessIdToSessionId(IN DWORD dwProcessId, OUT PDWORD pSessionId)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
void WINAPI DragFinish(HDROP h)
void WINAPI DragAcceptFiles(HWND hWnd, BOOL b)
UINT WINAPI DragQueryFileA(HDROP hDrop, UINT lFile, LPSTR lpszFile, UINT lLength)
BOOL WINAPI DragQueryPoint(HDROP hDrop, POINT *p)
GLdouble GLdouble GLdouble r
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
#define memcpy(s1, s2, n)
static PEXPLICIT_ACCESSW *static HMODULE hmod
static UINT WPARAM wparam
static UINT WPARAM LPARAM lparam
static void test_dragdrophelper(void)
static HRESULT WINAPI test_moniker_IsRunning(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, IMoniker *pmkNewlyRunning)
static HRESULT WINAPI PropertyStorage_Commit(IPropertyStorage *This, DWORD grfCommitFlags)
static HRESULT WINAPI PropertySetStorage_Create(IPropertySetStorage *This, REFFMTID rfmtid, const CLSID *pclsid, DWORD grfFlags, DWORD grfMode, IPropertyStorage **ppprstg)
static HRESULT WINAPI test_moniker_GetDisplayName(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, LPOLESTR *ppszDisplayName)
static const CLSID IPropertyStorage UINT *static const PROPSPEC PROPVARIANT *static UINT const PROPSPEC PROPVARIANT PROPID
static HRESULT WINAPI PropertyStorage_DeleteMultiple(IPropertyStorage *This, ULONG cpspec, const PROPSPEC *rgpspec)
static HRESULT WINAPI test_moniker_Save(IMoniker *iface, IStream *pStm, BOOL fClearDirty)
static ULONG WINAPI PropertySetStorage_AddRef(IPropertySetStorage *This)
static HRESULT WINAPI test_moniker_Load(IMoniker *iface, IStream *pStm)
static HRESULT WINAPI test_moniker_IsDirty(IMoniker *iface)
static const IMonikerVtbl test_moniker_vtbl
static HRESULT WINAPI test_activator_GetClassObject(IClassActivator *iface, REFCLSID clsid, DWORD context, LCID locale, REFIID riid, void **ppv)
static IClassActivator test_activator
static HRESULT WINAPI test_moniker_Hash(IMoniker *iface, DWORD *pdwHash)
static HKEY *static void init(void)
static HRESULT WINAPI test_moniker_IsEqual(IMoniker *iface, IMoniker *pmkOtherMoniker)
static ULONG WINAPI PropertyStorage_Release(IPropertyStorage *This)
static LRESULT WINAPI drop_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static ULONG WINAPI PropertySetStorage_Release(IPropertySetStorage *This)
static HRESULT WINAPI test_moniker_QueryInterface(IMoniker *iface, REFIID riid, void **ppvObject)
static void test_SHPropStg_functions(void)
static HRESULT WINAPI PropertyStorage_ReadPropertyNames(IPropertyStorage *This, ULONG cpropid, const PROPID *rgpropid, LPOLESTR *rglpwstrName)
static HRESULT WINAPI PropertyStorage_DeletePropertyNames(IPropertyStorage *This, ULONG cpropid, const PROPID *rgpropid)
#define CHECK_EXPECT(func)
static ULONG WINAPI test_activator_Release(IClassActivator *iface)
static ULONG WINAPI test_moniker_Release(IMoniker *iface)
static HRESULT WINAPI PropertySetStorage_QueryInterface(IPropertySetStorage *This, REFIID riid, void **ppvObject)
static IPropertySetStorage PropertySetStorage
static HRESULT WINAPI PropertyStorage_Enum(IPropertyStorage *This, IEnumSTATPROPSTG **ppenum)
#define DEFINE_EXPECT(func)
static HRESULT WINAPI PropertyStorage_WriteMultiple(IPropertyStorage *This, ULONG cpspec, const PROPSPEC *rgpspec, const PROPVARIANT *rgpropvar, PROPID propidNameFirst)
static IPropertyStorage PropertyStorage
static HRESULT WINAPI PropertyStorage_SetClass(IPropertyStorage *This, REFCLSID clsid)
static ULONG WINAPI PropertyStorage_AddRef(IPropertyStorage *This)
static void test_SHCreateQueryCancelAutoPlayMoniker(void)
static HRESULT WINAPI test_moniker_BindToObject(IMoniker *iface, IBindCtx *pbc, IMoniker *moniker_to_left, REFIID riid, void **ppv)
static HRESULT WINAPI test_moniker_Inverse(IMoniker *iface, IMoniker **ppmk)
static HRESULT WINAPI PropertyStorage_QueryInterface(IPropertyStorage *This, REFIID riid, void **ppvObject)
static ULONG WINAPI test_moniker_AddRef(IMoniker *iface)
static const IClassActivatorVtbl test_activator_vtbl
static IPropertySetStorageVtbl PropertySetStorageVtbl
static HRESULT WINAPI test_moniker_ComposeWith(IMoniker *iface, IMoniker *pmkRight, BOOL fOnlyIfNotGeneric, IMoniker **ppmkComposite)
static IMoniker test_moniker
static HRESULT WINAPI PropertyStorage_Revert(IPropertyStorage *This)
static ULONG WINAPI test_activator_AddRef(IClassActivator *iface)
static const CLSID IPropertyStorage UINT *static UINT
#define DROPTEST_FILENAME
#define WM_EXPECTED_VALUE
static HRESULT WINAPI test_moniker_GetTimeOfLastChange(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, FILETIME *pItemTime)
static HRESULT WINAPI test_activator_QI(IClassActivator *iface, REFIID riid, void **ppv)
static HRESULT WINAPI test_moniker_GetSizeMax(IMoniker *iface, ULARGE_INTEGER *pcbSize)
#define CHECK_CALLED(func)
static DWORD WINAPI drop_window_therad(void *arg)
static HRESULT WINAPI test_moniker_RelativePathTo(IMoniker *iface, IMoniker *pmOther, IMoniker **ppmkRelPath)
static HRESULT WINAPI PropertySetStorage_Enum(IPropertySetStorage *This, IEnumSTATPROPSETSTG **ppenum)
static HRESULT WINAPI PropertyStorage_ReadMultiple(IPropertyStorage *This, ULONG cpspec, const PROPSPEC *rgpspec, PROPVARIANT *rgpropvar)
static HRESULT WINAPI test_moniker_GetClassID(IMoniker *iface, CLSID *pClassID)
static HRESULT WINAPI PropertyStorage_WritePropertyNames(IPropertyStorage *This, ULONG cpropid, const PROPID *rgpropid, const LPOLESTR *rglpwstrName)
static void test_SHCreateSessionKey(void)
static HRESULT WINAPI test_moniker_CommonPrefixWith(IMoniker *iface, IMoniker *pmkOther, IMoniker **ppmkPrefix)
static HRESULT WINAPI test_moniker_IsSystemMoniker(IMoniker *iface, DWORD *pwdMksys)
static HRESULT WINAPI PropertyStorage_SetTimes(IPropertyStorage *This, const FILETIME *pctime, const FILETIME *patime, const FILETIME *pmtime)
static const CLSID IPropertyStorage UINT *static ULONG
static HRESULT WINAPI test_moniker_ParseDisplayName(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut)
static HRESULT WINAPI PropertySetStorage_Open(IPropertySetStorage *This, REFFMTID rfmtid, DWORD grfMode, IPropertyStorage **ppprstg)
static void test_DragQueryFile(BOOL non_client_flag)
static HRESULT WINAPI test_moniker_BindToStorage(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riid, VOID **ppvResult)
static HRESULT WINAPI test_moniker_Reduce(IMoniker *iface, IBindCtx *pbc, DWORD dwReduceHowFar, IMoniker **ppmkToLeft, IMoniker **ppmkReduced)
static HRESULT WINAPI PropertySetStorage_Delete(IPropertySetStorage *This, REFFMTID rfmtid)
static HRESULT WINAPI PropertyStorage_Stat(IPropertyStorage *This, STATPROPSETSTG *statpsstg)
static HRESULT WINAPI test_moniker_Enum(IMoniker *iface, BOOL fForward, IEnumMoniker **ppenumMoniker)
static IPropertyStorageVtbl PropertyStorageVtbl
HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC *ppbc)
#define WS_EX_ACCEPTFILES
const GUID IID_IPersistStream
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
static __inline const char * wine_dbgstr_guid(const GUID *id)
struct _DROPFILES DROPFILES
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventA(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
DWORD WINAPI GetLastError(void)
DWORD WINAPI GetCurrentProcessId(void)
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
#define STG_E_FILENOTFOUND
#define HKEY_CURRENT_USER
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
BOOL WINAPI UnregisterClassA(_In_ LPCSTR, HINSTANCE)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
BOOL WINAPI GetWindowInfo(_In_ HWND, _Inout_ PWINDOWINFO)
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
BOOL WINAPI GetMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)