33#define test_provideclassinfo(a, b) _test_provideclassinfo((IDispatch*)a, b, __LINE__)
43 ok_(__FILE__,
line) (
hr ==
S_OK,
"Failed to get IProvideClassInfo, %#lx.\n",
hr);
45 hr = IProvideClassInfo_GetClassInfo(
classinfo, &ti);
48 hr = ITypeInfo_GetTypeAttr(ti, &
attr);
55 ok(
hr ==
S_OK,
"Failed to QI for IUnknown.\n");
56 ok(unk == (
IUnknown *)disp,
"Got unk %p, original %p\n", unk, disp);
57 IUnknown_Release(unk);
60 ITypeInfo_ReleaseTypeAttr(ti,
attr);
61 ITypeInfo_Release(ti);
82 hr = IDispatch_QueryInterface(disp, &IID_IDictionary, (
void**)&dict);
88 hr = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (
void**)&dispex);
101 exists = VARIANT_FALSE;
102 hr = IDictionary_Exists(dict, &
key, &exists);
104 ok(exists == VARIANT_TRUE,
"Expected TRUE but got FALSE.\n");
107 exists = VARIANT_TRUE;
110 hr = IDictionary_Exists(dict, &
key, &exists);
112 ok(exists == VARIANT_FALSE,
"Expected FALSE but got TRUE.\n");
115 hr = IDictionary_get_Count(dict, &
count);
119 IDictionary_Release(dict);
120 IDispatch_Release(disp);
131 &IID_IDictionary, (
void**)&dict);
135 hr = IDictionary_get_CompareMode(dict,
NULL);
138 hr = IDictionary_get_CompareMode(dict, &
method);
143 hr = IDictionary_put_CompareMode(dict, 10);
146 hr = IDictionary_get_CompareMode(dict, &
method);
150 hr = IDictionary_put_CompareMode(dict, DatabaseCompare);
153 hr = IDictionary_get_CompareMode(dict, &
method);
164 hr = IDictionary_put_CompareMode(dict, BinaryCompare);
167 IDictionary_Release(dict);
208 unsigned int exp_bias : 8;
209 unsigned int sign : 1;
218 unsigned int m_lo : 32;
219 unsigned int m_hi : 20;
220 unsigned int exp_bias : 11;
221 unsigned int sign : 1;
280 ok(0,
"unexpected\n");
291 ok(0,
"unexpected call\n");
297 ok(0,
"unexpected call\n");
304 ok(0,
"unexpected call\n");
311 ok(0,
"unexpected call\n");
332 static const WCHAR str_hash_tests[][10] =
342 static const int int_hash_tests[] = {
346 static const FLOAT float_hash_tests[] = {
347 0.0, -1.0, 100.0, 1.0, 255.0, 1.234, 2175.0, 6259.0
361 &IID_IDictionary, (
void**)&dict);
367 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
376 hr = IDictionary_put_CompareMode(dict, BinaryCompare);
382 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
395 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
402 hr = IDictionary_put_CompareMode(dict, DatabaseCompare);
408 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
418 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
426 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
434 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
442 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
450 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
458 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
473 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
478 i2 = int_hash_tests[
i];
482 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
490 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
495 i4 = int_hash_tests[
i];
499 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
508 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
513 ui1 = int_hash_tests[
i];
517 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
525 fx4.
i.exp_bias = 0xff;
530 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
539 fx4.
i.exp_bias = 0xff;
544 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
551 fx8.
i.exp_bias = 0x7ff;
556 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
565 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
575 fx8.
i.exp_bias = 0x7ff;
580 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
588 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
603 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
608 flt = float_hash_tests[
i];
612 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
620 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
625 dbl = float_hash_tests[
i];
629 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
637 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
643 date = float_hash_tests[
i];
646 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
657 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
667 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
676 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
686 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
695 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
704 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
711 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
721 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
732 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
742 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
750 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
758 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
763 IDictionary_Release(dict);
774 &IID_IDictionary, (
void**)&dict);
782 hr = IDictionary_Exists(dict, &
key,
NULL);
787 exists = VARIANT_TRUE;
788 hr = IDictionary_Exists(dict, &
key, &exists);
790 ok(exists == VARIANT_FALSE,
"got %x\n", exists);
799 ok(
hr == CTL_E_KEY_ALREADY_EXISTS,
"Unexpected hr %#lx.\n",
hr);
803 hr = IDictionary_Exists(dict, &
key,
NULL);
808 exists = VARIANT_FALSE;
809 hr = IDictionary_Exists(dict, &
key, &exists);
811 ok(exists == VARIANT_TRUE,
"got %x\n", exists);
816 exists = VARIANT_FALSE;
817 hr = IDictionary_Exists(dict, &
key, &exists);
819 ok(exists == VARIANT_TRUE,
"got %x\n", exists);
821 IDictionary_Release(dict);
832 &IID_IDictionary, (
void**)&dict);
835 hr = IDictionary_Keys(dict,
NULL);
839 hr = IDictionary_Keys(dict, &
keys);
851 hr = IDictionary_Keys(dict, &
keys);
870 hr = IDictionary_RemoveAll(dict);
881 hr = IDictionary_Keys(dict, &
keys);
893 IDictionary_Release(dict);
903 &IID_IDictionary, (
void**)&dict);
907 hr = IDictionary_Remove(dict,
NULL);
912 hr = IDictionary_Remove(dict, &
key);
913 ok(
hr == CTL_E_ELEMENT_NOT_FOUND,
"Unexpected hr %#lx.\n",
hr);
919 hr = IDictionary_Remove(dict, &
key);
922 IDictionary_Release(dict);
932 &IID_IDictionary, (
void**)&dict);
939 hr = IDictionary_get_Item(dict, &
key, &
item);
946 hr = IDictionary_get_Item(dict, &
key, &
item);
950 IDictionary_Release(dict);
961 &IID_IDictionary, (
void**)&dict);
972 hr = IDictionary_get_Item(dict, &
key1, &
item);
983 V_R4(&key2) = 6259.0;
986 hr = IDictionary_get_HashVal(dict, &
key1, &hash1);
989 hr = IDictionary_get_HashVal(dict, &
key1, &hash2);
993 ok(
V_I4(&hash1) ==
V_I4(&hash2),
"Unexpected hash %#lx.\n",
V_I4(&hash1));
1000 hr = IDictionary_Add(dict, &key2, &
item);
1007 ok(
hr == CTL_E_KEY_ALREADY_EXISTS,
"Unexpected hr %#lx.\n",
hr);
1012 hr = IDictionary_RemoveAll(dict);
1027 hr = IDictionary_Add(dict, &key2, &
item);
1028 ok(
hr == CTL_E_KEY_ALREADY_EXISTS,
"Unexpected hr %#lx.\n",
hr);
1033 hr = IDictionary_Add(dict, &key2, &
item);
1036 hr = IDictionary_RemoveAll(dict);
1039 hr = IDictionary_Add(dict, &key2, &
item);
1042 hr = IDictionary_Add(dict, &key2, &
item);
1043 ok(
hr == CTL_E_KEY_ALREADY_EXISTS,
"Unexpected hr %#lx.\n",
hr);
1050 IDictionary_Release(dict);
1063 &IID_IDictionary, (
void**)&dict);
1067 hr = IDictionary__NewEnum(dict,
NULL);
1069 hr = IDictionary__NewEnum(dict, &enum1);
1072 hr = IDictionary__NewEnum(dict, &enum2);
1074 ok(enum1 != enum2,
"got %p, %p\n", enum2, enum1);
1075 IUnknown_Release(enum2);
1077 hr = IUnknown_QueryInterface(enum1, &IID_IEnumVARIANT, (
void**)&
enumvar);
1079 IUnknown_Release(enum1);
1092 hr = IDictionary_Add(dict, &
key, &
item);
1109 hr = IDictionary_Add(dict, &
key, &
item);
1116 hr = IDictionary_Add(dict, &
key, &
item);
1127 ok(fetched == 1,
"Unexpected value %lu.\n", fetched);
1132 hr = IDictionary_Remove(dict, &
key);
1140 ok(fetched == 1,
"Unexpected value %lu.\n", fetched);
1147 ok(fetched == 1,
"Unexpected value %lu.\n", fetched);
1158 hr = IDictionary_Add(dict, &
key, &
item);
1166 IEnumVARIANT_Release(
enumvar);
1167 IDictionary_Release(dict);
1178 &IID_IDictionary, (
void **)&dict);
1185 hr = IDictionary_putref_Item(dict, &
key, &
item);
1189 hr = IDictionary_get_Item(dict, &
key, &
item2);
1199 hr = IDictionary_putref_Item(dict, &
key, &
item);
1201 hr = IDictionary_get_Item(dict, &
key, &
item2);
1206 IDictionary_Release(dict);
1219 win_skip(
"Dictionary object is not supported: hr %#lx.\n",
hr);
1223 IDispatch_Release(disp);
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
LPWSTR WINAPI CharLowerW(WCHAR *str)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
HRESULT WINAPI SafeArrayGetUBound(SAFEARRAY *psa, UINT nDim, LONG *plUbound)
HRESULT WINAPI SafeArrayGetElement(SAFEARRAY *psa, LONG *rgIndices, void *pvData)
UINT WINAPI SafeArrayGetDim(SAFEARRAY *psa)
static DWORD get_str_hash(const WCHAR *str, CompareMethod method)
static DWORD get_num_hash(FLOAT num)
static DWORD get_ptr_hash(void *ptr)
GLuint GLuint GLsizei count
GLenum const GLfloat * params
GLuint64EXT GLuint GLuint GLenum GLenum GLuint GLuint GLenum GLuint GLuint key1
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
const IID IID_IObjectWithSite
static IActiveScriptSite * site
static EXCEPINFO excepinfo
#define test_provideclassinfo(a, b)
static void test_hash_value(void)
static HRESULT WINAPI test_unk_no_QI(IUnknown *iface, REFIID riid, void **obj)
static void test_comparemode(void)
static IUnknown test_unk2
static void test_Exists(void)
static void test_interfaces(void)
static void test_Remove(void)
static void test_Keys(void)
static void test_Item(void)
static IDispatch test_disp
static ULONG WINAPI test_disp_AddRef(IDispatch *iface)
static HRESULT WINAPI test_disp_GetTypeInfo(IDispatch *iface, UINT index, LCID lcid, ITypeInfo **ti)
static HRESULT WINAPI test_disp_QI(IDispatch *iface, REFIID riid, void **obj)
static ULONG WINAPI test_disp_Release(IDispatch *iface)
static ULONG WINAPI test_unk_AddRef(IUnknown *iface)
static void _test_provideclassinfo(IDispatch *disp, const GUID *guid, int line)
static void test_Add(void)
static HRESULT WINAPI test_disp_Invoke(IDispatch *iface, DISPID dispid, REFIID riid, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *arg_err)
static HRESULT WINAPI test_disp_GetTypeInfoCount(IDispatch *iface, UINT *count)
static HRESULT WINAPI test_disp_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOLESTR *names, UINT name_count, LCID lcid, DISPID *dispid)
static const IUnknownVtbl test_unk_vtbl
static void test_putref_Item(void)
static void test_IEnumVARIANT(void)
static HRESULT WINAPI test_unk_QI(IUnknown *iface, REFIID riid, void **obj)
static ULONG WINAPI test_unk_Release(IUnknown *iface)
static const IDispatchVtbl test_disp_vtbl
static const IUnknownVtbl test_unk_no_vtbl
static VARIANTARG static DISPID
BSTR WINAPI SysAllocString(LPCOLESTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
#define CTL_E_ILLEGALFUNCTIONCALL
const GUID IID_IProvideClassInfo
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
static __inline const char * wine_dbgstr_guid(const GUID *id)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
void WINAPI VariantInit(VARIANTARG *pVarg)