36#define test_provideclassinfo(a, b) _test_provideclassinfo((IDispatch*)a, b, __LINE__)
46 ok_(__FILE__,
line) (
hr ==
S_OK,
"Failed to get IProvideClassInfo, %#x.\n",
hr);
48 hr = IProvideClassInfo_GetClassInfo(
classinfo, &ti);
51 hr = ITypeInfo_GetTypeAttr(ti, &
attr);
58 ok(
hr ==
S_OK,
"Failed to QI for IUnknown.\n");
59 ok(unk == (
IUnknown *)disp,
"Got unk %p, original %p\n", unk, disp);
60 IUnknown_Release(unk);
63 ITypeInfo_ReleaseTypeAttr(ti,
attr);
64 ITypeInfo_Release(ti);
69 static const WCHAR key_add[] = {
'a', 0};
70 static const WCHAR key_add_value[] = {
'a', 0};
71 static const WCHAR key_non_exist[] = {
'b', 0};
88 hr = IDispatch_QueryInterface(disp, &IID_IDictionary, (
void**)&dict);
94 hr = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (
void**)&dispex);
107 exists = VARIANT_FALSE;
108 hr = IDictionary_Exists(dict, &
key, &exists);
110 ok(exists == VARIANT_TRUE,
"Expected TRUE but got FALSE.\n");
113 exists = VARIANT_TRUE;
116 hr = IDictionary_Exists(dict, &
key, &exists);
118 ok(exists == VARIANT_FALSE,
"Expected FALSE but got TRUE.\n");
121 hr = IDictionary_get_Count(dict, &
count);
125 IDictionary_Release(dict);
126 IDispatch_Release(disp);
137 &IID_IDictionary, (
void**)&dict);
141 hr = IDictionary_get_CompareMode(dict,
NULL);
144 hr = IDictionary_get_CompareMode(dict, &
method);
149 hr = IDictionary_put_CompareMode(dict, 10);
152 hr = IDictionary_get_CompareMode(dict, &
method);
156 hr = IDictionary_put_CompareMode(dict, DatabaseCompare);
159 hr = IDictionary_get_CompareMode(dict, &
method);
170 hr = IDictionary_put_CompareMode(dict, BinaryCompare);
173 IDictionary_Release(dict);
210 unsigned int exp_bias : 8;
211 unsigned int sign : 1;
220 unsigned int m_lo : 32;
221 unsigned int m_hi : 20;
222 unsigned int exp_bias : 11;
223 unsigned int sign : 1;
248 ok(0,
"unexpected\n");
283 ok(0,
"unexpected\n");
294 ok(0,
"unexpected call\n");
300 ok(0,
"unexpected call\n");
307 ok(0,
"unexpected call\n");
314 ok(0,
"unexpected call\n");
335 static const WCHAR str_hash_tests[][10] = {
337 {
'a',
'B',
'C',
'd',
'1',0},
344 static const int int_hash_tests[] = {
348 static const FLOAT float_hash_tests[] = {
349 0.0, -1.0, 100.0, 1.0, 255.0, 1.234
363 &IID_IDictionary, (
void**)&dict);
369 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
377 hr = IDictionary_put_CompareMode(dict, BinaryCompare);
383 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
397 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
405 hr = IDictionary_put_CompareMode(dict, DatabaseCompare);
411 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
422 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
430 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
438 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
446 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
454 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
462 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
477 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
483 i2 = int_hash_tests[
i];
487 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
496 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
502 i4 = int_hash_tests[
i];
506 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
516 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
522 ui1 = int_hash_tests[
i];
526 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
535 fx4.
i.exp_bias = 0xff;
540 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
549 fx4.
i.exp_bias = 0xff;
554 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
561 fx8.
i.exp_bias = 0x7ff;
566 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
575 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
585 fx8.
i.exp_bias = 0x7ff;
590 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
598 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
613 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
619 flt = float_hash_tests[
i];
623 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
632 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
638 dbl = float_hash_tests[
i];
642 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
651 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
658 date = float_hash_tests[
i];
661 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
673 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
683 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
692 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
702 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
711 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
720 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
727 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
737 hr = IDictionary_get_HashVal(dict, &
key, &
hash);
748 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,
"got 0x%08x\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 IDictionary_Release(dict);
880 &IID_IDictionary, (
void**)&dict);
884 hr = IDictionary_Remove(dict,
NULL);
889 hr = IDictionary_Remove(dict, &
key);
890 ok(
hr == CTL_E_ELEMENT_NOT_FOUND,
"got 0x%08x\n",
hr);
896 hr = IDictionary_Remove(dict, &
key);
899 IDictionary_Release(dict);
909 &IID_IDictionary, (
void**)&dict);
916 hr = IDictionary_get_Item(dict, &
key, &
item);
923 hr = IDictionary_get_Item(dict, &
key, &
item);
927 IDictionary_Release(dict);
932 static const WCHAR testW[] = {
't',
'e',
's',
't',
'W',0};
939 &IID_IDictionary, (
void**)&dict);
950 hr = IDictionary_get_Item(dict, &
key, &
item);
956 IDictionary_Release(dict);
969 &IID_IDictionary, (
void**)&dict);
973 hr = IDictionary__NewEnum(dict,
NULL);
975 hr = IDictionary__NewEnum(dict, &enum1);
978 hr = IDictionary__NewEnum(dict, &enum2);
980 ok(enum1 != enum2,
"got %p, %p\n", enum2, enum1);
981 IUnknown_Release(enum2);
983 hr = IUnknown_QueryInterface(enum1, &IID_IEnumVARIANT, (
void**)&
enumvar);
985 IUnknown_Release(enum1);
1015 hr = IDictionary_Add(dict, &
key, &
item);
1022 hr = IDictionary_Add(dict, &
key, &
item);
1033 ok(fetched == 1,
"got %u\n", fetched);
1038 hr = IDictionary_Remove(dict, &
key);
1046 ok(fetched == 1,
"got %u\n", fetched);
1053 ok(fetched == 1,
"got %u\n", fetched);
1064 hr = IDictionary_Add(dict, &
key, &
item);
1072 IEnumVARIANT_Release(
enumvar);
1073 IDictionary_Release(dict);
1086 win_skip(
"Dictionary object is not supported: %08x\n",
hr);
1090 IDispatch_Release(disp);
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)
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
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
static const WCHAR testW[]
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_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)
LPWSTR WINAPI CharLowerW(_Inout_ LPWSTR)