Commit e9ef4df8 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

vbscript/tests: Enable compilation with long types.

parent 3357b26e
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = vbscript.dll
IMPORTS = oleaut32 ole32 advapi32
......
......@@ -155,7 +155,7 @@ static HRESULT WINAPI ObjectWithSite_SetSite(IObjectWithSite *iface, IUnknown *p
ok(pUnkSite != NULL, "pUnkSite == NULL\n");
hres = IUnknown_QueryInterface(pUnkSite, &IID_IServiceProvider, (void**)&sp);
ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IServiceProvider iface: %08lx\n", hres);
IServiceProvider_Release(sp);
return SetSite_hres;
......@@ -241,7 +241,7 @@ static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember,
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
{
ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex);
ok(0, "unexpected call %s %lx\n", wine_dbgstr_w(bstrName), grfdex);
return E_NOTIMPL;
}
......@@ -278,7 +278,7 @@ static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown
static HRESULT WINAPI Test_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
{
if(!lstrcmpW(bstrName, L"reportSuccess")) {
ok(grfdex == fdexNameCaseInsensitive, "grfdex = %x\n", grfdex);
ok(grfdex == fdexNameCaseInsensitive, "grfdex = %lx\n", grfdex);
*pid = DISPID_TEST_REPORTSUCCESS;
return S_OK;
}
......@@ -334,7 +334,7 @@ static IDispatchEx testObj = { &testObjVtbl };
static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
{
if(!lstrcmpW(bstrName, L"ok")) {
ok(grfdex == fdexNameCaseSensitive, "grfdex = %x\n", grfdex);
ok(grfdex == fdexNameCaseSensitive, "grfdex = %lx\n", grfdex);
*pid = DISPID_GLOBAL_OK;
return S_OK;
}
......@@ -467,14 +467,14 @@ static HRESULT WINAPI InternetHostSecurityManager_ProcessUrlAction(IInternetHost
{
CHECK_EXPECT(ProcessUrlAction);
ok(dwAction == URLACTION_ACTIVEX_RUN, "dwAction = %x\n", dwAction);
ok(dwAction == URLACTION_ACTIVEX_RUN, "dwAction = %lx\n", dwAction);
ok(pPolicy != NULL, "pPolicy == NULL\n");
ok(cbPolicy == sizeof(DWORD), "cbPolicy = %d\n", cbPolicy);
ok(cbPolicy == sizeof(DWORD), "cbPolicy = %ld\n", cbPolicy);
ok(pContext != NULL, "pContext == NULL\n");
ok(cbContext == sizeof(GUID), "cbContext = %d\n", cbContext);
ok(cbContext == sizeof(GUID), "cbContext = %ld\n", cbContext);
ok(IsEqualGUID(pContext, &CLSID_TestObj), "pContext = %s\n", wine_dbgstr_guid((const IID*)pContext));
ok(!dwFlags, "dwFlags = %x\n", dwFlags);
ok(!dwReserved, "dwReserved = %x\n", dwReserved);
ok(!dwFlags, "dwFlags = %lx\n", dwFlags);
ok(!dwReserved, "dwReserved = %lx\n", dwReserved);
if(SUCCEEDED(ProcessUrlAction_hres))
*(DWORD*)pPolicy = ProcessUrlAction_policy;
......@@ -494,12 +494,12 @@ static HRESULT WINAPI InternetHostSecurityManager_QueryCustomPolicy(IInternetHos
ok(ppPolicy != NULL, "ppPolicy == NULL\n");
ok(pcbPolicy != NULL, "pcbPolicy == NULL\n");
ok(pContext != NULL, "pContext == NULL\n");
ok(cbContext == sizeof(struct CONFIRMSAFETY), "cbContext = %d\n", cbContext);
ok(!dwReserved, "dwReserved = %x\n", dwReserved);
ok(cbContext == sizeof(struct CONFIRMSAFETY), "cbContext = %ld\n", cbContext);
ok(!dwReserved, "dwReserved = %lx\n", dwReserved);
/* TODO: CLSID */
ok(cs->pUnk != NULL, "cs->pUnk == NULL\n");
ok(!cs->dwFlags, "dwFlags = %x\n", cs->dwFlags);
ok(!cs->dwFlags, "dwFlags = %lx\n", cs->dwFlags);
if(FAILED(QueryCustomPolicy_hres))
return QueryCustomPolicy_hres;
......@@ -609,7 +609,7 @@ static HRESULT WINAPI ActiveScriptSite_GetLCID(IActiveScriptSite *iface, LCID *p
static HRESULT WINAPI ActiveScriptSite_GetItemInfo(IActiveScriptSite *iface, LPCOLESTR pstrName,
DWORD dwReturnMask, IUnknown **ppiunkItem, ITypeInfo **ppti)
{
ok(dwReturnMask == SCRIPTINFO_IUNKNOWN, "unexpected dwReturnMask %x\n", dwReturnMask);
ok(dwReturnMask == SCRIPTINFO_IUNKNOWN, "unexpected dwReturnMask %lx\n", dwReturnMask);
ok(!ppti, "ppti != NULL\n");
ok(!lstrcmpW(pstrName, L"test"), "pstrName = %s\n", wine_dbgstr_w(pstrName));
......@@ -671,7 +671,7 @@ static void set_safety_options(IUnknown *unk, BOOL use_sec_mgr)
HRESULT hres;
hres = IUnknown_QueryInterface(unk, &IID_IObjectSafety, (void**)&safety);
ok(hres == S_OK, "Could not get IObjectSafety: %08x\n", hres);
ok(hres == S_OK, "Could not get IObjectSafety: %08lx\n", hres);
if(FAILED(hres))
return;
......@@ -682,13 +682,13 @@ static void set_safety_options(IUnknown *unk, BOOL use_sec_mgr)
options_set = INTERFACE_USES_DISPEX;
hres = IObjectSafety_SetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, options_all, options_set);
ok(hres == S_OK, "SetInterfaceSafetyOptions failed: %08x\n", hres);
ok(hres == S_OK, "SetInterfaceSafetyOptions failed: %08lx\n", hres);
supported = enabled = 0xdeadbeef;
hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, &supported, &enabled);
ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08x\n", hres);
ok(supported == options_all, "supported=%x, expected %x\n", supported, options_all);
ok(enabled == options_set, "enabled=%x, expected %x\n", enabled, options_set);
ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08lx\n", hres);
ok(supported == options_all, "supported=%lx, expected %lx\n", supported, options_all);
ok(enabled == options_set, "enabled=%lx, expected %lx\n", enabled, options_set);
IObjectSafety_Release(safety);
}
......@@ -702,7 +702,7 @@ static void _parse_script_a(unsigned line, IActiveScriptParse *parser, const cha
str = a2bstr(script);
hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
SysFreeString(str);
ok_(__FILE__,line)(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
}
static HRESULT parse_script_ae(IActiveScriptParse *parser, const char *script)
......@@ -736,27 +736,27 @@ static IActiveScriptParse *create_script(BOOL use_sec_mgr)
hres = CoCreateInstance(&CLSID_VBScript, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IActiveScript, (void**)&script);
ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres);
ok(hres == S_OK, "CoCreateInstance failed: %08lx\n", hres);
if(FAILED(hres))
return NULL;
set_safety_options((IUnknown*)script, use_sec_mgr);
hres = IActiveScript_QueryInterface(script, &IID_IActiveScriptParse, (void**)&parser);
ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres);
ok(hres == S_OK, "Could not get IActiveScriptParse: %08lx\n", hres);
hres = IActiveScriptParse_InitNew(parser);
ok(hres == S_OK, "InitNew failed: %08x\n", hres);
ok(hres == S_OK, "InitNew failed: %08lx\n", hres);
hres = IActiveScript_SetScriptSite(script, &ActiveScriptSite);
ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres);
ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres);
hres = IActiveScript_AddNamedItem(script, L"test",
SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS);
ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres);
ok(hres == S_OK, "AddNamedItem failed: %08lx\n", hres);
hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_STARTED);
ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres);
ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08lx\n", hres);
IActiveScript_Release(script);
......@@ -789,7 +789,7 @@ static void test_CreateObject(void)
parser = create_script(TRUE);
hres = parse_script_ae(parser, "Call CreateObject(\"Wine.TestABC\")");
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres);
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres);
IActiveScriptParse_Release(parser);
......@@ -798,7 +798,7 @@ static void test_CreateObject(void)
SET_EXPECT(Host_QS_SecMgr);
hres = parse_script_ae(parser, "Call CreateObject(\"Wine.Test\")");
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres);
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres);
CHECK_CALLED(Host_QS_SecMgr);
IActiveScriptParse_Release(parser);
......@@ -809,7 +809,7 @@ static void test_CreateObject(void)
SET_EXPECT(Host_QS_SecMgr);
SET_EXPECT(ProcessUrlAction);
hres = parse_script_ae(parser, "Call CreateObject(\"Wine.Test\")");
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres);
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres);
CHECK_CALLED(Host_QS_SecMgr);
CHECK_CALLED(ProcessUrlAction);
......@@ -821,7 +821,7 @@ static void test_CreateObject(void)
SET_EXPECT(Host_QS_SecMgr);
SET_EXPECT(ProcessUrlAction);
hres = parse_script_ae(parser, "Call CreateObject(\"Wine.Test\")");
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres);
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres);
CHECK_CALLED(Host_QS_SecMgr);
CHECK_CALLED(ProcessUrlAction);
......@@ -834,7 +834,7 @@ static void test_CreateObject(void)
SET_EXPECT(ProcessUrlAction);
SET_EXPECT(CreateInstance);
hres = parse_script_ae(parser, "Call CreateObject(\"Wine.Test\")");
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres);
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres);
CHECK_CALLED(Host_QS_SecMgr);
CHECK_CALLED(ProcessUrlAction);
CHECK_CALLED(CreateInstance);
......@@ -849,7 +849,7 @@ static void test_CreateObject(void)
SET_EXPECT(CreateInstance);
SET_EXPECT(QueryCustomPolicy);
hres = parse_script_ae(parser, "Call CreateObject(\"Wine.Test\")");
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres);
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres);
CHECK_CALLED(Host_QS_SecMgr);
CHECK_CALLED(ProcessUrlAction);
CHECK_CALLED(CreateInstance);
......@@ -884,7 +884,7 @@ static void test_CreateObject(void)
SET_EXPECT(CreateInstance);
SET_EXPECT(QueryCustomPolicy);
hres = parse_script_ae(parser, "Call CreateObject(\"Wine.Test\")");
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres);
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres);
CHECK_CALLED(Host_QS_SecMgr);
CHECK_CALLED(ProcessUrlAction);
CHECK_CALLED(CreateInstance);
......@@ -896,7 +896,7 @@ static void test_CreateObject(void)
SET_EXPECT(CreateInstance);
SET_EXPECT(QueryCustomPolicy);
hres = parse_script_ae(parser, "Call CreateObject(\"Wine.Test\")");
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres);
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres);
CHECK_CALLED(ProcessUrlAction);
CHECK_CALLED(CreateInstance);
CHECK_CALLED(QueryCustomPolicy);
......@@ -908,7 +908,7 @@ static void test_CreateObject(void)
SET_EXPECT(CreateInstance);
SET_EXPECT(QueryCustomPolicy);
hres = parse_script_ae(parser, "Call CreateObject(\"Wine.Test\")");
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres);
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres);
CHECK_CALLED(ProcessUrlAction);
CHECK_CALLED(CreateInstance);
CHECK_CALLED(QueryCustomPolicy);
......@@ -953,7 +953,7 @@ static void test_CreateObject(void)
SET_EXPECT(QI_IObjectWithSite);
SET_EXPECT(SetSite);
hres = parse_script_ae(parser, "Call CreateObject(\"Wine.Test\")");
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres);
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres);
CHECK_CALLED(ProcessUrlAction);
CHECK_CALLED(CreateInstance);
CHECK_CALLED(QueryCustomPolicy);
......@@ -971,7 +971,7 @@ static void test_GetObject(void)
/* Never allowed with security manager */
parser = create_script(TRUE);
hres = parse_script_ae(parser, "Call GetObject(\"clsid:" TESTOBJINST_CLSID "\").reportSuccess()");
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08x\n", hres);
ok(hres == VB_E_CANNOT_CREATE_OBJ, "hres = %08lx\n", hres);
IActiveScriptParse_Release(parser);
parser = create_script(FALSE);
......@@ -983,14 +983,14 @@ static void test_GetObject(void)
if(broken(hres == VB_E_ACCESS_DENIED)) /* 64-bit win8 fails on the first try */
hres = parse_script_ae(parser, "Call GetObject(\"clsid:" TESTOBJINST_CLSID "\").reportSuccess()");
if(hres == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND)) { /* Workaround for broken win2k */
win_skip("got unexpected error %08x\n", hres);
win_skip("got unexpected error %08lx\n", hres);
CLEAR_CALLED(QI_IObjectWithSite);
CLEAR_CALLED(SetSite);
CLEAR_CALLED(reportSuccess);
IActiveScriptParse_Release(parser);
return;
}
ok(hres == S_OK, "hres = %08x\n", hres);
ok(hres == S_OK, "hres = %08lx\n", hres);
CHECK_CALLED(QI_IObjectWithSite);
CHECK_CALLED(SetSite);
CHECK_CALLED(reportSuccess);
......@@ -999,7 +999,7 @@ static void test_GetObject(void)
SET_EXPECT(QI_IObjectWithSite);
SET_EXPECT(SetSite);
hres = parse_script_ae(parser, "Call GetObject(\"clsid:" TESTOBJINST_CLSID "\").reportSuccess()");
ok(hres == E_FAIL, "hres = %08x\n", hres);
ok(hres == E_FAIL, "hres = %08lx\n", hres);
CHECK_CALLED(QI_IObjectWithSite);
CHECK_CALLED(SetSite);
......@@ -1015,7 +1015,7 @@ static void test_GetObject(void)
/* Invalid moniker */
parser = create_script(FALSE);
hres = parse_script_ae(parser, "Call GetObject(\"nonexistent:test\").reportSuccess()");
ok(hres == MK_E_SYNTAX, "hres = %08x\n", hres);
ok(hres == MK_E_SYNTAX, "hres = %08lx\n", hres);
IActiveScriptParse_Release(parser);
}
......@@ -1058,11 +1058,11 @@ static BOOL register_activex(void)
hres = CoRegisterClassObject(&CLSID_TestObj, (IUnknown *)&activex_cf,
CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &regid);
ok(hres == S_OK, "Could not register script engine: %08x\n", hres);
ok(hres == S_OK, "Could not register script engine: %08lx\n", hres);
hres = CoRegisterClassObject(&CLSID_TestObjInst, (IUnknown *)&testObj,
CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &regid);
ok(hres == S_OK, "Could not register script engine: %08x\n", hres);
ok(hres == S_OK, "Could not register script engine: %08lx\n", hres);
return TRUE;
}
......
......@@ -283,43 +283,43 @@ static void test_disp(IDispatch *disp)
HRESULT hres;
hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
ok(hres == S_OK, "Could not get IDispatchEx iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IDispatchEx iface: %08lx\n", hres);
str = a2bstr("publicProp");
hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &public_prop_id);
SysFreeString(str);
ok(hres == S_OK, "GetDispID(publicProp) failed: %08x\n", hres);
ok(hres == S_OK, "GetDispID(publicProp) failed: %08lx\n", hres);
str = a2bstr("PUBLICPROP");
hres = IDispatchEx_GetDispID(dispex, str, 0, &id);
SysFreeString(str);
ok(hres == S_OK, "GetDispID(PUBLICPROP) failed: %08x\n", hres);
ok(public_prop_id == id, "id = %d\n", public_prop_id);
ok(hres == S_OK, "GetDispID(PUBLICPROP) failed: %08lx\n", hres);
ok(public_prop_id == id, "id = %ld\n", public_prop_id);
str = a2bstr("publicPROP2");
hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &public_prop2_id);
SysFreeString(str);
ok(hres == S_OK, "GetDispID(publicProp2) failed: %08x\n", hres);
ok(hres == S_OK, "GetDispID(publicProp2) failed: %08lx\n", hres);
str = a2bstr("defValGet");
hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &defvalget_id);
SysFreeString(str);
ok(hres == S_OK, "GetDispID(defValGet) failed: %08x\n", hres);
ok(defvalget_id == DISPID_VALUE, "id = %d\n", defvalget_id);
ok(hres == S_OK, "GetDispID(defValGet) failed: %08lx\n", hres);
ok(defvalget_id == DISPID_VALUE, "id = %ld\n", defvalget_id);
str = a2bstr("privateProp");
hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &id);
SysFreeString(str);
ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(privateProp) failed: %08x, expected DISP_E_UNKNOWNNAME\n", hres);
ok(id == -1, "id = %d\n", id);
ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(privateProp) failed: %08lx, expected DISP_E_UNKNOWNNAME\n", hres);
ok(id == -1, "id = %ld\n", id);
str = a2bstr("class_initialize");
hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &id);
SysFreeString(str);
ok(hres == S_OK, "GetDispID(publicProp2) failed: %08x\n", hres);
ok(hres == S_OK, "GetDispID(publicProp2) failed: %08lx\n", hres);
hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_EMPTY, "V_VT(v) = %d\n", V_VT(&v));
V_VT(args) = VT_BOOL;
......@@ -327,30 +327,30 @@ static void test_disp(IDispatch *disp)
dp.cArgs = dp.cNamedArgs = 1;
V_VT(&v) = VT_BOOL;
hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYPUT, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_EMPTY, "V_VT(v) = %d\n", V_VT(&v));
dp.cArgs = dp.cNamedArgs = 0;
hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BOOL, "V_VT(v) = %d\n", V_VT(&v));
ok(V_BOOL(&v), "V_BOOL(v) = %x\n", V_BOOL(&v));
dp.cArgs = dp.cNamedArgs = 0;
hres = IDispatchEx_Invoke(dispex, public_prop_id, &IID_NULL, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BOOL, "V_VT(v) = %d\n", V_VT(&v));
ok(V_BOOL(&v), "V_BOOL(v) = %x\n", V_BOOL(&v));
dp.cArgs = dp.cNamedArgs = 0;
hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BOOL, "V_VT(v) = %d\n", V_VT(&v));
ok(V_BOOL(&v), "V_BOOL(v) = %x\n", V_BOOL(&v));
dp.cArgs = 1;
hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL);
ok(hres == DISP_E_MEMBERNOTFOUND, "InvokeEx failed: %08x, expected DISP_E_MEMBERNOTFOUND\n", hres);
ok(hres == DISP_E_MEMBERNOTFOUND, "InvokeEx failed: %08lx, expected DISP_E_MEMBERNOTFOUND\n", hres);
ok(V_VT(&v) == VT_EMPTY, "V_VT(v) = %d\n", V_VT(&v));
SET_EXPECT(testobj_value_i);
......@@ -358,12 +358,12 @@ static void test_disp(IDispatch *disp)
V_DISPATCH(args) = (IDispatch*)&testObj;
dp.cArgs = dp.cNamedArgs = 1;
hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYPUT, &dp, NULL, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
CHECK_CALLED(testobj_value_i);
dp.cArgs = dp.cNamedArgs = 0;
hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_I2, "V_VT(v) = %d\n", V_VT(&v));
ok(V_I2(&v) == 0, "V_I2(v) = %d\n", V_I2(&v));
......@@ -371,17 +371,17 @@ static void test_disp(IDispatch *disp)
V_DISPATCH(args) = (IDispatch*)&testObj;
dp.cArgs = dp.cNamedArgs = 1;
hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYPUT|DISPATCH_PROPERTYPUTREF, &dp, NULL, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
V_VT(args) = VT_DISPATCH;
V_DISPATCH(args) = (IDispatch*)&testObj;
dp.cArgs = dp.cNamedArgs = 1;
hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYPUTREF, &dp, NULL, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
dp.cArgs = dp.cNamedArgs = 0;
hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_DISPATCH, "V_VT(v) = %d\n", V_VT(&v));
ok(V_DISPATCH(&v) == (IDispatch*)&testObj, "V_DISPATCH(v) != testObj\n");
......@@ -389,11 +389,11 @@ static void test_disp(IDispatch *disp)
V_BOOL(args) = VARIANT_TRUE;
dp.cArgs = dp.cNamedArgs = 1;
hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYPUT|DISPATCH_PROPERTYPUTREF, &dp, NULL, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
dp.cArgs = dp.cNamedArgs = 0;
hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BOOL, "V_VT(v) = %d\n", V_VT(&v));
ok(V_BOOL(&v) == VARIANT_TRUE, "V_BOOL(v) = %x\n", V_BOOL(&v));
......@@ -401,7 +401,7 @@ static void test_disp(IDispatch *disp)
V_BOOL(args) = VARIANT_FALSE;
dp.cArgs = dp.cNamedArgs = 1;
hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYPUTREF, &dp, NULL, &ei, NULL);
ok(hres == DISP_E_EXCEPTION, "InvokeEx failed: %08x, expected DISP_E_EXCEPTION\n", hres);
ok(hres == DISP_E_EXCEPTION, "InvokeEx failed: %08lx, expected DISP_E_EXCEPTION\n", hres);
V_VT(args) = VT_BOOL;
V_BOOL(args) = VARIANT_FALSE;
......@@ -409,124 +409,124 @@ static void test_disp(IDispatch *disp)
dp.cNamedArgs = 0;
V_VT(&v) = VT_BOOL;
hres = IDispatchEx_InvokeEx(dispex, public_prop_id, 0, DISPATCH_PROPERTYPUT, &dp, NULL, &ei, NULL);
ok(hres == DISP_E_PARAMNOTOPTIONAL, "InvokeEx failed: %08x, expected DISP_E_PARAMNOTOPTIONAL\n", hres);
ok(hres == DISP_E_PARAMNOTOPTIONAL, "InvokeEx failed: %08lx, expected DISP_E_PARAMNOTOPTIONAL\n", hres);
str = a2bstr("publicFunction");
hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &public_func_id);
SysFreeString(str);
ok(hres == S_OK, "GetDispID(publicFunction) failed: %08x\n", hres);
ok(hres == S_OK, "GetDispID(publicFunction) failed: %08lx\n", hres);
ok(public_func_id != -1, "public_func_id = -1\n");
str = a2bstr("publicSub");
hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &public_sub_id);
SysFreeString(str);
ok(hres == S_OK, "GetDispID(publicSub) failed: %08x\n", hres);
ok(hres == S_OK, "GetDispID(publicSub) failed: %08lx\n", hres);
ok(public_sub_id != -1, "public_func_id = -1\n");
dp.cArgs = dp.cNamedArgs = 0;
hres = IDispatchEx_InvokeEx(dispex, public_func_id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_I2, "V_VT(v) = %d\n", V_VT(&v));
ok(V_I2(&v) == 4, "V_I2(v) = %d\n", V_I2(&v));
dp.cArgs = dp.cNamedArgs = 0;
hres = IDispatchEx_InvokeEx(dispex, public_func_id, 0, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL);
ok(hres == DISP_E_MEMBERNOTFOUND, "InvokeEx failed: %08x, expected DISP_E_MEMBERNOTFOUND\n", hres);
ok(hres == DISP_E_MEMBERNOTFOUND, "InvokeEx failed: %08lx, expected DISP_E_MEMBERNOTFOUND\n", hres);
ok(V_VT(&v) == VT_EMPTY, "V_VT(v) = %d\n", V_VT(&v));
dp.cArgs = dp.cNamedArgs = 0;
hres = IDispatchEx_InvokeEx(dispex, public_func_id, 0, DISPATCH_METHOD, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_I2, "V_VT(v) = %d\n", V_VT(&v));
ok(V_I2(&v) == 4, "V_I2(v) = %d\n", V_I2(&v));
dp.cArgs = dp.cNamedArgs = 0;
hres = IDispatchEx_InvokeEx(dispex, public_sub_id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_EMPTY, "V_VT(v) = %d\n", V_VT(&v));
dp.cArgs = dp.cNamedArgs = 0;
hres = IDispatchEx_InvokeEx(dispex, public_sub_id, 0, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL);
ok(hres == DISP_E_MEMBERNOTFOUND, "InvokeEx failed: %08x, expected DISP_E_MEMBERNOTFOUND\n", hres);
ok(hres == DISP_E_MEMBERNOTFOUND, "InvokeEx failed: %08lx, expected DISP_E_MEMBERNOTFOUND\n", hres);
ok(V_VT(&v) == VT_EMPTY, "V_VT(v) = %d\n", V_VT(&v));
dp.cArgs = dp.cNamedArgs = 0;
hres = IDispatchEx_InvokeEx(dispex, public_sub_id, 0, DISPATCH_METHOD, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_EMPTY, "V_VT(v) = %d\n", V_VT(&v));
V_VT(args) = VT_BOOL;
V_BOOL(args) = VARIANT_TRUE;
dp.cArgs = dp.cNamedArgs = 1;
hres = IDispatchEx_InvokeEx(dispex, public_sub_id, 0, DISPATCH_PROPERTYPUT, &dp, NULL, &ei, NULL);
ok(FAILED(hres), "InvokeEx succeeded: %08x\n", hres);
ok(FAILED(hres), "InvokeEx succeeded: %08lx\n", hres);
dp.cArgs = dp.cNamedArgs = 0;
hres = IDispatchEx_InvokeEx(dispex, public_func_id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_I2, "V_VT(v) = %d\n", V_VT(&v));
ok(V_I2(&v) == 4, "V_I2(v) = %d\n", V_I2(&v));
dp.cArgs = dp.cNamedArgs = 0;
hres = IDispatchEx_InvokeEx(dispex, public_func_id, 0, DISPATCH_METHOD, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_I2, "V_VT(v) = %d\n", V_VT(&v));
ok(V_I2(&v) == 4, "V_I2(v) = %d\n", V_I2(&v));
dp.cArgs = dp.cNamedArgs = 0;
hres = IDispatchEx_Invoke(dispex, public_func_id, &IID_NULL, 0, DISPATCH_METHOD, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_I2, "V_VT(v) = %d\n", V_VT(&v));
ok(V_I2(&v) == 4, "V_I2(v) = %d\n", V_I2(&v));
dp.cArgs = dp.cNamedArgs = 0;
hres = IDispatchEx_InvokeEx(dispex, public_sub_id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_EMPTY, "V_VT(v) = %d\n", V_VT(&v));
dp.cArgs = dp.cNamedArgs = 0;
hres = IDispatchEx_InvokeEx(dispex, public_sub_id, 0, DISPATCH_METHOD, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_EMPTY, "V_VT(v) = %d\n", V_VT(&v));
str = a2bstr("privateSub");
hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &id);
SysFreeString(str);
ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(privateSub) failed: %08x, expected DISP_E_UNKNOWNNAME\n", hres);
ok(id == -1, "id = %d\n", id);
ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(privateSub) failed: %08lx, expected DISP_E_UNKNOWNNAME\n", hres);
ok(id == -1, "id = %ld\n", id);
str = a2bstr("dynprop");
hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive|fdexNameEnsure, &id);
ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(privateProp) failed: %08x, expected DISP_E_UNKNOWNNAME\n", hres);
ok(id == -1, "id = %d\n", id);
ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(privateProp) failed: %08lx, expected DISP_E_UNKNOWNNAME\n", hres);
ok(id == -1, "id = %ld\n", id);
hres = IDispatchEx_GetDispID(dispex, str, fdexNameEnsure, &id);
ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(privateProp) failed: %08x, expected DISP_E_UNKNOWNNAME\n", hres);
ok(id == -1, "id = %d\n", id);
ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(privateProp) failed: %08lx, expected DISP_E_UNKNOWNNAME\n", hres);
ok(id == -1, "id = %ld\n", id);
SysFreeString(str);
str = a2bstr("publicProp");
hres = IDispatchEx_GetDispID(dispex, str, 0x80000000|fdexNameCaseInsensitive, &public_prop_id);
SysFreeString(str);
ok(hres == S_OK, "GetDispID(publicProp) failed: %08x\n", hres);
ok(hres == S_OK, "GetDispID(publicProp) failed: %08lx\n", hres);
id = 0xdeadbeef;
str = a2bstr("publicProp");
hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseSensitive, &id);
SysFreeString(str);
ok(hres == S_OK, "GetDispID(publicProp) failed: %08x\n", hres);
ok(id == public_prop_id, "id = %d, expected %d\n", id, public_prop_id);
ok(hres == S_OK, "GetDispID(publicProp) failed: %08lx\n", hres);
ok(id == public_prop_id, "id = %ld, expected %ld\n", id, public_prop_id);
id = 0xdeadbeef;
str = a2bstr("publicprop");
hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseSensitive, &id);
SysFreeString(str);
ok(hres == S_OK, "GetDispID(publicProp) failed: %08x\n", hres);
ok(id == public_prop_id, "id = %d, expected %d\n", id, public_prop_id);
ok(hres == S_OK, "GetDispID(publicProp) failed: %08lx\n", hres);
ok(id == public_prop_id, "id = %ld, expected %ld\n", id, public_prop_id);
str = a2bstr("gsGetProp");
hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &gs_getter_id);
SysFreeString(str);
ok(hres == S_OK, "GetDispID(publicFunction) failed: %08x\n", hres);
ok(hres == S_OK, "GetDispID(publicFunction) failed: %08lx\n", hres);
ok(gs_getter_id != -1, "gs_getter_id = -1\n");
V_VT(args) = VT_BOOL;
......@@ -535,18 +535,18 @@ static void test_disp(IDispatch *disp)
dp.cArgs = 1;
V_VT(&v) = VT_I8;
hres = IDispatchEx_InvokeEx(dispex, gs_getter_id, 0, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BOOL && V_BOOL(&v), "V_VT(v) = %d\n", V_VT(&v));
hres = IDispatchEx_InvokeEx(dispex, gs_getter_id, 0, DISPATCH_PROPERTYGET, &dp, NULL, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
V_VT(args) = VT_BOOL;
V_BOOL(args) = VARIANT_FALSE;
dp.cArgs = 1;
V_VT(&v) = VT_I8;
hres = IDispatchEx_InvokeEx(dispex, gs_getter_id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BOOL && !V_BOOL(&v), "V_VT(v) = %d\n", V_VT(&v));
V_VT(args) = VT_BOOL;
......@@ -554,7 +554,7 @@ static void test_disp(IDispatch *disp)
V_VT(&v) = VT_I8;
dp.cArgs = 1;
hres = IDispatchEx_InvokeEx(dispex, gs_getter_id, 0, DISPATCH_METHOD, &dp, &v, &ei, NULL);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
ok(V_VT(&v) == VT_BOOL && V_BOOL(&v), "V_VT(v) = %d\n", V_VT(&v));
IDispatchEx_Release(dispex);
......@@ -570,20 +570,20 @@ static void test_safearray(SAFEARRAY *safearray, unsigned indims)
todo_wine
ok(safearray->fFeatures == (FADF_VARIANT|FADF_HAVEVARTYPE|FADF_FIXEDSIZE|FADF_STATIC),
"safearray->fFeatures = %x\n", safearray->fFeatures);
ok(safearray->cbElements == sizeof(VARIANT), "safearray->cbElements = %x\n", safearray->cbElements);
ok(!safearray->cLocks, "safearray->cLocks = %x\n", safearray->cLocks);
ok(safearray->cbElements == sizeof(VARIANT), "safearray->cbElements = %lx\n", safearray->cbElements);
ok(!safearray->cLocks, "safearray->cLocks = %lx\n", safearray->cLocks);
for(i=0; i < safearray->cDims; i++) {
ok(safearray->rgsabound[i].cElements == (indims ? i+4 : 1), "safearray->rgsabound[%d].cElements = %d\n", i,
ok(safearray->rgsabound[i].cElements == (indims ? i+4 : 1), "safearray->rgsabound[%d].cElements = %ld\n", i,
safearray->rgsabound[i].cElements);
ok(!safearray->rgsabound[i].lLbound, "safearray->rgsabound[%d].lLbound = %d\n", i, safearray->rgsabound[i].lLbound);
ok(!safearray->rgsabound[i].lLbound, "safearray->rgsabound[%d].lLbound = %ld\n", i, safearray->rgsabound[i].lLbound);
}
}
#define test_grfdex(a,b) _test_grfdex(__LINE__,a,b)
static void _test_grfdex(unsigned line, DWORD grfdex, DWORD expect)
{
ok_(__FILE__,line)(grfdex == expect, "grfdex = %x, expected %x\n", grfdex, expect);
ok_(__FILE__,line)(grfdex == expect, "grfdex = %lx, expected %lx\n", grfdex, expect);
}
static IDispatchEx enumDisp;
......@@ -650,7 +650,7 @@ static HRESULT WINAPI EnumVARIANT_Next(IEnumVARIANT *iface, ULONG celt, VARIANT
if(strict_dispid_check)
CHECK_EXPECT2(Next);
ok(celt == 1, "celt = %d\n", celt);
ok(celt == 1, "celt = %ld\n", celt);
ok(V_VT(rgVar) == VT_EMPTY, "V_VT(rgVar) = %d\n", V_VT(rgVar));
ok(!pCeltFetched, "pCeltFetched = %p\n", pCeltFetched);
......@@ -777,7 +777,7 @@ static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember,
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
{
ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex);
ok(0, "unexpected call %s %lx\n", wine_dbgstr_w(bstrName), grfdex);
return E_NOTIMPL;
}
......@@ -820,7 +820,7 @@ static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DW
static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp,
VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
{
ok(0, "unexpected call %d\n", id);
ok(0, "unexpected call %ld\n", id);
return E_NOTIMPL;
}
......@@ -926,7 +926,7 @@ static HRESULT WINAPI testObj_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
ok(pdp->cArgs == 3, "cArgs = %d\n", pdp->cArgs);
ok(pdp->cNamedArgs == 1, "cNamedArgs = %d\n", pdp->cNamedArgs);
ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]);
ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %ld\n", pdp->rgdispidNamedArgs[0]);
ok(!pvarRes, "pvarRes != NULL\n");
ok(pei != NULL, "pei == NULL\n");
......@@ -965,7 +965,7 @@ static HRESULT WINAPI testObj_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
ok(pdp->rgdispidNamedArgs != NULL, "rgdispidNamedArgs == NULL\n");
ok(pdp->cArgs == 1, "cArgs = %d\n", pdp->cArgs);
ok(pdp->cNamedArgs == 1, "cNamedArgs = %d\n", pdp->cNamedArgs);
ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]);
ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %ld\n", pdp->rgdispidNamedArgs[0]);
ok(!pvarRes, "pvarRes != NULL\n");
ok(pei != NULL, "pei == NULL\n");
......@@ -979,7 +979,7 @@ static HRESULT WINAPI testObj_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
return S_OK;
}
ok(0, "unexpected call %d\n", id);
ok(0, "unexpected call %ld\n", id);
return E_FAIL;
}
......@@ -1064,7 +1064,7 @@ static HRESULT WINAPI collectionObj_InvokeEx(IDispatchEx *iface, DISPID id, LCID
return S_OK;
}
ok(0, "unexpected call %d\n", id);
ok(0, "unexpected call %ld\n", id);
return E_NOTIMPL;
}
......@@ -1168,7 +1168,7 @@ static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD
if(get_dispid(bstrName, dispids, ARRAY_SIZE(dispids), pid))
return S_OK;
if(strict_dispid_check && wcscmp(bstrName, L"x"))
ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex);
ok(0, "unexpected call %s %lx\n", wine_dbgstr_w(bstrName), grfdex);
return DISP_E_UNKNOWNNAME;
}
......@@ -1275,7 +1275,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
ok(pdp->rgdispidNamedArgs != NULL, "rgdispidNamedArgs == NULL\n");
ok(pdp->cArgs == 1, "cArgs = %d\n", pdp->cArgs);
ok(pdp->cNamedArgs == 1, "cNamedArgs = %d\n", pdp->cNamedArgs);
ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]);
ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %ld\n", pdp->rgdispidNamedArgs[0]);
ok(!pvarRes, "pvarRes != NULL\n");
ok(pei != NULL, "pei == NULL\n");
......@@ -1292,7 +1292,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
ok(pdp->rgdispidNamedArgs != NULL, "rgdispidNamedArgs == NULL\n");
ok(pdp->cArgs == 1, "cArgs = %d\n", pdp->cArgs);
ok(pdp->cNamedArgs == 1, "cNamedArgs = %d\n", pdp->cNamedArgs);
ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]);
ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %ld\n", pdp->rgdispidNamedArgs[0]);
ok(!pvarRes, "pvarRes != NULL\n");
ok(pei != NULL, "pei == NULL\n");
......@@ -1309,7 +1309,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
ok(pdp->rgdispidNamedArgs != NULL, "rgdispidNamedArgs == NULL\n");
ok(pdp->cArgs == 1, "cArgs = %d\n", pdp->cArgs);
ok(pdp->cNamedArgs == 1, "cNamedArgs = %d\n", pdp->cNamedArgs);
ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]);
ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %ld\n", pdp->rgdispidNamedArgs[0]);
ok(!pvarRes, "pvarRes != NULL\n");
ok(pei != NULL, "pei == NULL\n");
......@@ -1408,7 +1408,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
ok(pdp->rgdispidNamedArgs != NULL, "rgdispidNamedArgs == NULL\n");
ok(pdp->cArgs == 3, "cArgs = %d\n", pdp->cArgs);
ok(pdp->cNamedArgs == 1, "cNamedArgs = %d\n", pdp->cNamedArgs);
ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]);
ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %ld\n", pdp->rgdispidNamedArgs[0]);
ok(!pvarRes, "pvarRes != NULL\n");
ok(pei != NULL, "pei == NULL\n");
......@@ -1431,7 +1431,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
ok(pdp->rgdispidNamedArgs != NULL, "rgdispidNamedArgs == NULL\n");
ok(pdp->cArgs == 2, "cArgs = %d\n", pdp->cArgs);
ok(pdp->cNamedArgs == 1, "cNamedArgs = %d\n", pdp->cNamedArgs);
ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]);
ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %ld\n", pdp->rgdispidNamedArgs[0]);
ok(!pvarRes, "pvarRes != NULL\n");
ok(pei != NULL, "pei == NULL\n");
......@@ -1452,7 +1452,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
ok(pdp->rgdispidNamedArgs != NULL, "rgdispidNamedArgs == NULL\n");
ok(pdp->cArgs == 2, "cArgs = %d\n", pdp->cArgs);
ok(pdp->cNamedArgs == 1, "cNamedArgs = %d\n", pdp->cNamedArgs);
ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]);
ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %ld\n", pdp->rgdispidNamedArgs[0]);
ok(!pvarRes, "pvarRes != NULL\n");
ok(pei != NULL, "pei == NULL\n");
......@@ -1568,7 +1568,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
ok(opt == 1 || opt == 2, "opt = %d\n", opt);
v = pdp->rgvarg+pdp->cArgs-opt;
ok(V_VT(v) == VT_ERROR, "V_VT(v) = %d\n", V_VT(v));
ok(V_ERROR(v) == DISP_E_PARAMNOTFOUND, "V_ERROR(v) = %08x\n", V_ERROR(v));
ok(V_ERROR(v) == DISP_E_PARAMNOTFOUND, "V_ERROR(v) = %08lx\n", V_ERROR(v));
return S_OK;
}
case DISPID_GLOBAL_GLOBALCALLBACK: {
......@@ -1594,18 +1594,18 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
ok(pei != NULL, "pei == NULL\n");
hres = IDispatch_QueryInterface(V_DISPATCH(pdp->rgvarg), &IID_IDispatchEx, (void**)&dispex);
ok(hres == S_OK, "Could not get IDispatchEx iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IDispatchEx iface: %08lx\n", hres);
str = SysAllocString(L"callback");
hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &id);
ok(hres == S_OK, "GetDispID failed: %08x\n", hres);
ok(hres == S_OK, "GetDispID failed: %08lx\n", hres);
SysFreeString(str);
SET_EXPECT(OnEnterScript);
SET_EXPECT(OnLeaveScript);
memset(&ei, 0, sizeof(ei));
hres = IDispatchEx_InvokeEx(dispex, id, 0, DISPATCH_METHOD, &dp, &v, &ei, pspCaller);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
CHECK_CALLED(OnEnterScript);
CHECK_CALLED(OnLeaveScript);
ok(V_VT(&v) == VT_BOOL, "V_VT(v) = %d\n", V_VT(&v));
......@@ -1644,40 +1644,40 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
ok(V_VT(pdp->rgvarg) == VT_DISPATCH, "V_VT(pdp->rgvarg) = %d\n", V_VT(pdp->rgvarg));
disp = V_DISPATCH(pdp->rgvarg);
hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
ok(hres == E_NOINTERFACE, "Could not get IDispatchEx iface: %08x\n", hres);
ok(hres == E_NOINTERFACE, "Could not get IDispatchEx iface: %08lx\n", hres);
hres = IDispatch_GetTypeInfoCount(disp, &count);
ok(hres == S_OK, "GetTypeInfoCount returned: %08x\n", hres);
ok(hres == S_OK, "GetTypeInfoCount returned: %08lx\n", hres);
ok(count == 0, "count = %u\n", count);
hres = IDispatch_GetTypeInfo(disp, 0, 0, &typeinfo);
ok(hres == DISP_E_BADINDEX, "GetTypeInfo returned: %08x\n", hres);
ok(hres == DISP_E_BADINDEX, "GetTypeInfo returned: %08lx\n", hres);
for(i = 0; i < ARRAY_SIZE(props); i++) {
names[0] = props[i];
hres = IDispatch_GetIDsOfNames(disp, &IID_NULL, names, 1, 0, &id);
ok(hres == S_OK, "GetIDsOfNames failed: %08x\n", hres);
ok(id == i + 1, "%s id = %u\n", wine_dbgstr_w(props[i]), id);
ok(hres == S_OK, "GetIDsOfNames failed: %08lx\n", hres);
ok(id == i + 1, "%s id = %lu\n", wine_dbgstr_w(props[i]), id);
}
memset(&dp, 0, sizeof(dp));
memset(&ei, 0, sizeof(ei));
V_VT(&v) = VT_ERROR;
hres = IDispatch_Invoke(disp, 5, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL);
ok(hres == S_OK, "Invoke failed: %08x\n", hres);
ok(hres == S_OK, "Invoke failed: %08lx\n", hres);
ok(V_VT(&v) == VT_I4, "V_VT(v) = %d\n", V_VT(&v));
ok(V_I4(&v) == 1, "V_I4(v) = %d\n", V_I4(&v));
ok(V_I4(&v) == 1, "V_I4(v) = %ld\n", V_I4(&v));
hres = IDispatch_Invoke(disp, DISPID_VALUE, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL);
ok(hres == S_OK, "Invoke failed: %08x\n", hres);
ok(hres == S_OK, "Invoke failed: %08lx\n", hres);
ok(V_VT(&v) == VT_I4, "V_VT(v) = %d\n", V_VT(&v));
ok(V_I4(&v) == 1, "V_I4(v) = %d\n", V_I4(&v));
ok(V_I4(&v) == 1, "V_I4(v) = %ld\n", V_I4(&v));
dp.rgvarg = &v;
V_VT(&v) = VT_I4;
V_I4(&v) = 6;
V_VT(&r) = VT_EMPTY;
hres = IDispatch_Invoke(disp, DISPID_VALUE, &IID_NULL, 6, DISPATCH_METHOD|DISPATCH_PROPERTYGET, &dp, &r, &ei, NULL);
ok(hres == S_OK, "Invoke failed: %08x\n", hres);
ok(hres == S_OK, "Invoke failed: %08lx\n", hres);
return S_OK;
}
case DISPID_GLOBAL_UNKOBJ:
......@@ -1686,7 +1686,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
return S_OK;
}
ok(0, "unexpected call %d\n", id);
ok(0, "unexpected call %ld\n", id);
return DISP_E_MEMBERNOTFOUND;
}
......@@ -1828,7 +1828,7 @@ static HRESULT WINAPI ActiveScriptSite_GetLCID(IActiveScriptSite *iface, LCID *p
static HRESULT WINAPI ActiveScriptSite_GetItemInfo(IActiveScriptSite *iface, LPCOLESTR pstrName,
DWORD dwReturnMask, IUnknown **ppiunkItem, ITypeInfo **ppti)
{
ok(dwReturnMask == SCRIPTINFO_IUNKNOWN, "unexpected dwReturnMask %x\n", dwReturnMask);
ok(dwReturnMask == SCRIPTINFO_IUNKNOWN, "unexpected dwReturnMask %lx\n", dwReturnMask);
ok(!ppti, "ppti != NULL\n");
if(lstrcmpW(pstrName, L"test"))
......@@ -1864,19 +1864,19 @@ static HRESULT WINAPI ActiveScriptSite_OnScriptError(IActiveScriptSite *iface, I
HRESULT hr = onerror_hres, hres;
hres = IActiveScriptError_GetSourcePosition(pscripterror, NULL, &error_line, &error_char);
ok(hres == S_OK, "GetSourcePosition failed: %08x\n", hres);
ok(hres == S_OK, "GetSourcePosition failed: %08lx\n", hres);
if(!expect_OnScriptError) {
EXCEPINFO info;
hres = IActiveScriptError_GetExceptionInfo(pscripterror, &info);
if(SUCCEEDED(hres))
trace("Error in line %u: %x %s\n", error_line + 1, info.wCode, wine_dbgstr_w(info.bstrDescription));
trace("Error in line %lu: %x %s\n", error_line + 1, info.wCode, wine_dbgstr_w(info.bstrDescription));
}else {
IDispatchEx *dispex;
hres = IActiveScriptError_QueryInterface(pscripterror, &IID_IDispatchEx, (void**)&dispex);
ok(hres == E_NOINTERFACE, "QI(IDispatchEx) returned: %08x\n", hres);
ok(hres == E_NOINTERFACE, "QI(IDispatchEx) returned: %08lx\n", hres);
}
if(store_script_error) {
......@@ -1928,7 +1928,7 @@ static IActiveScript *create_script(void)
hres = CoCreateInstance(&CLSID_VBScript, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IActiveScript, (void**)&script);
ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres);
ok(hres == S_OK, "CoCreateInstance failed: %08lx\n", hres);
return script;
}
......@@ -1944,24 +1944,24 @@ static IActiveScript *create_and_init_script(DWORD flags, BOOL start)
return NULL;
hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser);
ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres);
ok(hres == S_OK, "Could not get IActiveScriptParse: %08lx\n", hres);
hres = IActiveScriptParse_InitNew(parser);
ok(hres == S_OK, "InitNew failed: %08x\n", hres);
ok(hres == S_OK, "InitNew failed: %08lx\n", hres);
IActiveScriptParse_Release(parser);
hres = IActiveScript_SetScriptSite(engine, &ActiveScriptSite);
ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres);
ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres);
hres = IActiveScript_AddNamedItem(engine, L"test",
SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|flags);
ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres);
ok(hres == S_OK, "AddNamedItem failed: %08lx\n", hres);
if (start)
{
hres = IActiveScript_SetScriptState(engine, SCRIPTSTATE_STARTED);
ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres);
ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08lx\n", hres);
}
return engine;
......@@ -1973,10 +1973,10 @@ static void close_script(IActiveScript *script)
HRESULT hres;
hres = IActiveScript_Close(script);
ok(hres == S_OK, "Close failed: %08x\n", hres);
ok(hres == S_OK, "Close failed: %08lx\n", hres);
ref = IActiveScript_Release(script);
ok(!ref, "ref=%u\n", ref);
ok(!ref, "ref=%lu\n", ref);
}
static HRESULT parse_script(DWORD flags, BSTR script_str, const WCHAR *delim)
......@@ -1991,7 +1991,7 @@ static HRESULT parse_script(DWORD flags, BSTR script_str, const WCHAR *delim)
return S_OK;
hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser);
ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres);
ok(hres == S_OK, "Could not get IActiveScriptParse: %08lx\n", hres);
if (FAILED(hres))
{
IActiveScript_Release(engine);
......@@ -1999,7 +1999,7 @@ static HRESULT parse_script(DWORD flags, BSTR script_str, const WCHAR *delim)
}
hres = IActiveScript_GetScriptDispatch(engine, NULL, &script_disp);
ok(hres == S_OK, "GetScriptDispatch failed: %08x\n", hres);
ok(hres == S_OK, "GetScriptDispatch failed: %08lx\n", hres);
ok(script_disp != NULL, "script_disp == NULL\n");
ok(script_disp != (IDispatch*)&Global, "script_disp == Global\n");
......@@ -2022,7 +2022,7 @@ static void parse_script_af(DWORD flags, const char *src)
tmp = a2bstr(src);
hres = parse_script(flags, tmp, NULL);
SysFreeString(tmp);
ok(hres == S_OK, "parse_script failed: %08x\n", hres);
ok(hres == S_OK, "parse_script failed: %08lx\n", hres);
}
static HRESULT parse_script_ar(const char *src)
......@@ -2049,16 +2049,16 @@ static void test_parse_context(void)
return;
hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser);
ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres);
ok(hres == S_OK, "Could not get IActiveScriptParse: %08lx\n", hres);
/* NULL code text succeeds but does nothing */
hres = IActiveScriptParse_ParseScriptText(parser, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
/* unknown identifier context is not a valid argument */
str = a2bstr("Call reportSuccess()\n");
hres = IActiveScriptParse_ParseScriptText(parser, str, L"y", NULL, NULL, 0, 0, 0, NULL, NULL);
ok(hres == E_INVALIDARG, "ParseScriptText failed: %08x\n", hres);
ok(hres == E_INVALIDARG, "ParseScriptText failed: %08lx\n", hres);
SysFreeString(str);
str = a2bstr("class Cl\n"
......@@ -2069,27 +2069,27 @@ static void test_parse_context(void)
"Dim x\n"
"set x = new Cl\n");
hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
SysFreeString(str);
/* known global variable is not a valid context */
str = a2bstr("Call reportSuccess()\n");
hres = IActiveScriptParse_ParseScriptText(parser, str, L"x", NULL, NULL, 0, 0, 0, NULL, NULL);
ok(hres == E_INVALIDARG, "ParseScriptText failed: %08x\n", hres);
ok(hres == E_INVALIDARG, "ParseScriptText failed: %08lx\n", hres);
SysFreeString(str);
SET_EXPECT(global_success_d);
SET_EXPECT(global_success_i);
str = a2bstr("Call reportSuccess()\n");
hres = IActiveScriptParse_ParseScriptText(parser, str, L"test", NULL, NULL, 0, 0, 0, NULL, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
SysFreeString(str);
CHECK_CALLED(global_success_d);
CHECK_CALLED(global_success_i);
IActiveScriptParse_Release(parser);
close_script(engine);
ok(global_ref == 1, "global_ref = %u\n", global_ref);
ok(global_ref == 1, "global_ref = %lu\n", global_ref);
}
static void parse_script_a(const char *src)
......@@ -2106,7 +2106,7 @@ static void _parse_htmlscript_a(unsigned line, const char *src)
tmp = a2bstr(src);
hres = parse_script(SCRIPTITEM_GLOBALMEMBERS, tmp, L"</SCRIPT>");
SysFreeString(tmp);
ok_(__FILE__,line)(hres == S_OK, "parse_script failed: %08x\n", hres);
ok_(__FILE__,line)(hres == S_OK, "parse_script failed: %08lx\n", hres);
}
static IDispatchEx *parse_procedure(IActiveScriptParseProcedure2 *parse_proc, const char *src, DWORD flags)
......@@ -2120,12 +2120,12 @@ static IDispatchEx *parse_procedure(IActiveScriptParseProcedure2 *parse_proc, co
hres = IActiveScriptParseProcedure2_ParseProcedureText(parse_proc, str, NULL, L"", NULL, NULL, L"\"", 0, 0,
SCRIPTPROC_HOSTMANAGESSOURCE|SCRIPTPROC_IMPLICIT_THIS|SCRIPTPROC_IMPLICIT_PARENTS|flags, &disp);
SysFreeString(str);
ok(hres == S_OK, "ParseProcedureText failed: %08x\n", hres);
ok(hres == S_OK, "ParseProcedureText failed: %08lx\n", hres);
ok(disp != NULL, "disp = NULL\n");
hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
IDispatch_Release(disp);
ok(hres == S_OK, "Could not get IDispatchEx iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IDispatchEx iface: %08lx\n", hres);
return dispex;
}
......@@ -2146,10 +2146,10 @@ static void test_procedures(void)
script = create_and_init_script(0, TRUE);
hres = IActiveScript_QueryInterface(script, &IID_IActiveScriptParseProcedure2, (void**)&parse_proc);
ok(hres == S_OK, "Could not get IActiveScriptParseProcedure2 iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IActiveScriptParseProcedure2 iface: %08lx\n", hres);
hres = IActiveScriptParseProcedure2_ParseProcedureText(parse_proc, NULL, NULL, L"", NULL, NULL, NULL, 0, 0, 0, &disp);
ok(hres == S_OK, "ParseProcedureText failed: %08x\n", hres);
ok(hres == S_OK, "ParseProcedureText failed: %08lx\n", hres);
IDispatch_Release(disp);
proc = parse_procedure(parse_proc, "dim x\nif true then x=false", 0);
......@@ -2158,7 +2158,7 @@ static void test_procedures(void)
SET_EXPECT(OnLeaveScript);
V_VT(&v) = VT_EMPTY;
hres = IDispatchEx_InvokeEx(proc, DISPID_VALUE, 0, DISPATCH_METHOD, &dp, &v, &ei, &caller_sp);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
CHECK_CALLED(OnEnterScript);
CHECK_CALLED(OnLeaveScript);
VariantClear(&v);
......@@ -2169,7 +2169,7 @@ static void test_procedures(void)
SET_EXPECT(OnEnterScript);
SET_EXPECT(OnLeaveScript);
hres = IDispatchEx_InvokeEx(proc, DISPID_VALUE, 0, DISPATCH_METHOD, &dp, &v, &ei, &caller_sp);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
CHECK_CALLED(OnEnterScript);
CHECK_CALLED(OnLeaveScript);
ok(V_VT(&v) == VT_BSTR, "Expected VT_BSTR, got %s\n", vt2a(&v));
......@@ -2208,7 +2208,7 @@ static void test_callbacks(void)
script = create_and_init_script(SCRIPTITEM_GLOBALMEMBERS, TRUE);
hres = IActiveScript_QueryInterface(script, &IID_IActiveScriptParse, (void**)&parser);
ok(hres == S_OK, "Could not get IActiveScriptParseProcedure2 iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IActiveScriptParseProcedure2 iface: %08lx\n", hres);
SET_EXPECT(OnEnterScript);
SET_EXPECT(OnLeaveScript);
......@@ -2226,27 +2226,27 @@ static void test_callbacks(void)
L" call ok(err.number = 2, \"err.number = \" & err.number)\n"
L"end function\n",
NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
CHECK_CALLED(OnEnterScript);
CHECK_CALLED(OnLeaveScript);
hres = IActiveScript_GetScriptDispatch(script, NULL, &disp);
ok(hres == S_OK, "GetScriptDispatch failed: %08x\n", hres);
ok(hres == S_OK, "GetScriptDispatch failed: %08lx\n", hres);
hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
ok(hres == S_OK, "Could not get IDispatchEx iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IDispatchEx iface: %08lx\n", hres);
IDispatch_Release(disp);
str = SysAllocString(L"callGlobalCallback");
hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &id);
ok(hres == S_OK, "GetDispID failed: %08x\n", hres);
ok(hres == S_OK, "GetDispID failed: %08lx\n", hres);
SysFreeString(str);
SET_EXPECT(OnEnterScript);
/* OnLeaveScript will be set in global callback */
SET_EXPECT(global_globalcallback_i);
hres = IDispatchEx_InvokeEx(dispex, id, 0, DISPATCH_METHOD, &dp, &v, &ei, &caller_sp);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres);
/* OnEnterScript was checked in global callback */
CHECK_CALLED(OnLeaveScript);
CHECK_CALLED(global_globalcallback_i);
......@@ -2258,7 +2258,7 @@ static void test_callbacks(void)
SET_EXPECT(OnScriptError);
hres = IActiveScriptParse_ParseScriptText(parser, L"err.raise 2\n",
NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
ok(hres == MAKE_VBSERROR(2), "ParseScriptText failed: %08x\n", hres);
ok(hres == MAKE_VBSERROR(2), "ParseScriptText failed: %08lx\n", hres);
CHECK_CALLED(OnEnterScript);
CHECK_CALLED(OnLeaveScript);
CHECK_CALLED(OnScriptError);
......@@ -2272,14 +2272,14 @@ static void test_callbacks(void)
L"call ok(err.number = 0, \"err.number = \" & err.number)\n"
L"err.raise &h86664004&, \"src\", \"desc\", \"help\", 1\n",
NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
ok(hres == SCRIPT_E_RECORDED, "ParseScriptText failed: %08x\n", hres);
ok(hres == SCRIPT_E_RECORDED, "ParseScriptText failed: %08lx\n", hres);
CHECK_CALLED(OnEnterScript);
CHECK_CALLED(OnLeaveScript);
CHECK_CALLED(OnScriptError);
memset(&ei, 0xcc, sizeof(ei));
hres = IActiveScriptError_GetExceptionInfo(error1, &ei);
ok(hres == S_OK, "GetExceptionInfo returned %08x\n", hres);
ok(hres == S_OK, "GetExceptionInfo returned %08lx\n", hres);
ok(!ei.wCode, "wCode = %x\n", ei.wCode);
ok(!ei.wReserved, "wReserved = %x\n", ei.wReserved);
if(is_english) {
......@@ -2289,26 +2289,26 @@ static void test_callbacks(void)
"bstrDescription = %s\n", wine_dbgstr_w(ei.bstrDescription));
}
ok(!ei.bstrHelpFile, "bstrHelpFile = %s\n", wine_dbgstr_w(ei.bstrHelpFile));
ok(!ei.dwHelpContext, "dwHelpContext = %x\n", ei.dwHelpContext);
ok(!ei.dwHelpContext, "dwHelpContext = %lx\n", ei.dwHelpContext);
ok(!ei.pvReserved, "pvReserved = %p\n", ei.pvReserved);
ok(!ei.pfnDeferredFillIn, "pfnDeferredFillIn = %p\n", ei.pfnDeferredFillIn);
ok(ei.scode == MAKE_VBSERROR(2), "scode = %x\n", ei.scode);
ok(ei.scode == MAKE_VBSERROR(2), "scode = %lx\n", ei.scode);
free_ei(&ei);
IActiveScriptError_Release(error1);
memset(&ei, 0xcc, sizeof(ei));
hres = IActiveScriptError_GetExceptionInfo(error2, &ei);
ok(hres == S_OK, "GetExceptionInfo returned %08x\n", hres);
ok(hres == S_OK, "GetExceptionInfo returned %08lx\n", hres);
ok(!ei.wCode, "wCode = %x\n", ei.wCode);
ok(!ei.wReserved, "wReserved = %x\n", ei.wReserved);
ok(!wcscmp(ei.bstrSource, L"src"), "bstrSource = %s\n", wine_dbgstr_w(ei.bstrSource));
ok(!wcscmp(ei.bstrDescription, L"desc"), "bstrDescription = %s\n", wine_dbgstr_w(ei.bstrDescription));
ok(!wcscmp(ei.bstrHelpFile, L"help"), "bstrHelpFile = %s\n", wine_dbgstr_w(ei.bstrHelpFile));
ok(ei.dwHelpContext == 1, "dwHelpContext = %x\n", ei.dwHelpContext);
ok(ei.dwHelpContext == 1, "dwHelpContext = %lx\n", ei.dwHelpContext);
ok(!ei.pvReserved, "pvReserved = %p\n", ei.pvReserved);
ok(!ei.pfnDeferredFillIn, "pfnDeferredFillIn = %p\n", ei.pfnDeferredFillIn);
ok(ei.scode == SCRIPT_E_RECORDED, "scode = %x\n", ei.scode);
ok(ei.scode == SCRIPT_E_RECORDED, "scode = %lx\n", ei.scode);
free_ei(&ei);
IActiveScriptError_Release(error2);
......@@ -2318,7 +2318,7 @@ static void test_callbacks(void)
SET_EXPECT(OnScriptError);
hres = IActiveScriptParse_ParseScriptText(parser, L"err.raise &hffff&\n",
NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
ok(hres == MAKE_VBSERROR(0xffff), "ParseScriptText failed: %08x\n", hres);
ok(hres == MAKE_VBSERROR(0xffff), "ParseScriptText failed: %08lx\n", hres);
CHECK_CALLED(OnEnterScript);
CHECK_CALLED(OnLeaveScript);
CHECK_CALLED(OnScriptError);
......@@ -2328,7 +2328,7 @@ static void test_callbacks(void)
SET_EXPECT(OnScriptError);
hres = IActiveScriptParse_ParseScriptText(parser, L"err.raise &h80102030&\n",
NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
ok(hres == 0x80102030, "ParseScriptText failed: %08x\n", hres);
ok(hres == 0x80102030, "ParseScriptText failed: %08lx\n", hres);
CHECK_CALLED(OnEnterScript);
CHECK_CALLED(OnLeaveScript);
CHECK_CALLED(OnScriptError);
......@@ -2341,7 +2341,7 @@ static void test_callbacks(void)
L"err.raise 1\n"
L"testErrorObject err\n",
NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
CHECK_CALLED(OnEnterScript);
CHECK_CALLED(global_testerrorobject_i);
CHECK_CALLED(OnLeaveScript);
......@@ -2367,20 +2367,20 @@ static void test_gc(void)
return;
hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser);
ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres);
ok(hres == S_OK, "Could not get IActiveScriptParse: %08lx\n", hres);
hres = IActiveScriptParse_InitNew(parser);
ok(hres == S_OK, "InitNew failed: %08x\n", hres);
ok(hres == S_OK, "InitNew failed: %08lx\n", hres);
hres = IActiveScript_SetScriptSite(engine, &ActiveScriptSite);
ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres);
ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres);
hres = IActiveScript_AddNamedItem(engine, L"test",
SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS);
ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres);
ok(hres == S_OK, "AddNamedItem failed: %08lx\n", hres);
hres = IActiveScript_SetScriptState(engine, SCRIPTSTATE_STARTED);
ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres);
ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08lx\n", hres);
src = a2bstr(
"class C\n"
......@@ -2395,13 +2395,13 @@ static void test_gc(void)
"set x = nothing\n");
hres = IActiveScriptParse_ParseScriptText(parser, src, NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
SysFreeString(src);
SET_EXPECT(global_success_d);
SET_EXPECT(global_success_i);
hres = IActiveScript_Close(engine);
ok(hres == S_OK, "Close failed: %08x\n", hres);
ok(hres == S_OK, "Close failed: %08lx\n", hres);
CHECK_CALLED(global_success_d);
CHECK_CALLED(global_success_i);
......@@ -2547,13 +2547,13 @@ static void test_parse_errors(void)
SET_EXPECT(OnScriptError);
hres = parse_script_ar(invalid_scripts[i].src);
ok(hres == SCRIPT_E_REPORTED, "[%u] script returned: %08x\n", i, hres);
ok(hres == SCRIPT_E_REPORTED, "[%u] script returned: %08lx\n", i, hres);
CHECK_CALLED(OnScriptError);
ok(error_line == invalid_scripts[i].error_line, "[%u] error line %u expected %u\n",
ok(error_line == invalid_scripts[i].error_line, "[%u] error line %lu expected %u\n",
i, error_line, invalid_scripts[i].error_line);
todo_wine_if(invalid_scripts[i].error_char < 0)
ok(error_char == abs(invalid_scripts[i].error_char), "[%u] error char %d expected %d\n",
ok(error_char == abs(invalid_scripts[i].error_char), "[%u] error char %ld expected %d\n",
i, error_char, invalid_scripts[i].error_char);
}
}
......@@ -2620,7 +2620,7 @@ static HRESULT test_global_vars_ref(BOOL use_close)
return S_OK;
hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser);
ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres);
ok(hres == S_OK, "Could not get IActiveScriptParse: %08lx\n", hres);
if (FAILED(hres))
{
IActiveScript_Release(engine);
......@@ -2628,16 +2628,16 @@ static HRESULT test_global_vars_ref(BOOL use_close)
}
hres = IActiveScriptParse_InitNew(parser);
ok(hres == S_OK, "InitNew failed: %08x\n", hres);
ok(hres == S_OK, "InitNew failed: %08lx\n", hres);
hres = IActiveScript_SetScriptSite(engine, &ActiveScriptSite);
ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres);
ok(hres == S_OK, "SetScriptSite failed: %08lx\n", hres);
hres = IActiveScript_AddNamedItem(engine, L"test", SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS);
ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres);
ok(hres == S_OK, "AddNamedItem failed: %08lx\n", hres);
hres = IActiveScript_SetScriptState(engine, SCRIPTSTATE_STARTED);
ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres);
ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08lx\n", hres);
refobj_ref = 0;
......@@ -2649,18 +2649,18 @@ static HRESULT test_global_vars_ref(BOOL use_close)
if(use_close) {
hres = IActiveScript_Close(engine);
ok(hres == S_OK, "Close failed: %08x\n", hres);
ok(hres == S_OK, "Close failed: %08lx\n", hres);
}else {
hres = IActiveScript_SetScriptState(engine, SCRIPTSTATE_UNINITIALIZED);
ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres);
ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08lx\n", hres);
}
ok(!refobj_ref, "refobj_ref = %d\n", refobj_ref);
ok(!refobj_ref, "refobj_ref = %ld\n", refobj_ref);
IActiveScript_Release(engine);
ref = IActiveScriptParse_Release(parser);
ok(!ref, "ref=%d\n", ref);
ok(!ref, "ref=%ld\n", ref);
return hres;
}
......@@ -2678,7 +2678,7 @@ static void test_isexpression(void)
return;
hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser);
ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres);
ok(hres == S_OK, "Could not get IActiveScriptParse: %08lx\n", hres);
if (FAILED(hres))
{
close_script(engine);
......@@ -2687,25 +2687,25 @@ static void test_isexpression(void)
/* Expression when script is not started is still executed */
hres = IActiveScript_GetScriptState(engine, &ss);
ok(hres == S_OK, "GetScriptState failed: %08x\n", hres);
ok(hres == S_OK, "GetScriptState failed: %08lx\n", hres);
ok(ss == SCRIPTSTATE_INITIALIZED, "Wrong script state %u\n", ss);
str = a2bstr("13");
hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
ok(V_VT(&var) == VT_I2, "Expected VT_I2, got %s\n", vt2a(&var));
ok(V_I2(&var) == 13, "Expected 13, got %d\n", V_I2(&var));
VariantClear(&var);
SysFreeString(str);
hres = IActiveScript_SetScriptState(engine, SCRIPTSTATE_STARTED);
ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres);
ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08lx\n", hres);
/* Empty expressions */
V_VT(&var) = VT_I2;
str = a2bstr("");
hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
ok(V_VT(&var) == VT_EMPTY, "Expected VT_EMPTY, got %s\n", vt2a(&var));
VariantClear(&var);
SysFreeString(str);
......@@ -2714,7 +2714,7 @@ static void test_isexpression(void)
str = a2bstr("1\n3");
SET_EXPECT(OnScriptError);
hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL);
ok(FAILED(hres), "ParseScriptText did not fail: %08x\n", hres);
ok(FAILED(hres), "ParseScriptText did not fail: %08lx\n", hres);
CHECK_CALLED(OnScriptError);
VariantClear(&var);
SysFreeString(str);
......@@ -2722,10 +2722,10 @@ static void test_isexpression(void)
/* Simple numerical expression */
str = a2bstr("(1 + 7) * 2 - 3");
hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, NULL, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
ok(V_VT(&var) == VT_I2, "Expected VT_I2, got %s\n", vt2a(&var));
ok(V_I2(&var) == 13, "Expected 13, got %d\n", V_I2(&var));
VariantClear(&var);
......@@ -2733,10 +2733,10 @@ static void test_isexpression(void)
/* Without a global host or named item context, "me" returns the script dispatch */
hres = IActiveScript_GetScriptDispatch(engine, NULL, &disp);
ok(hres == S_OK, "GetScriptDispatch failed: %08x\n", hres);
ok(hres == S_OK, "GetScriptDispatch failed: %08lx\n", hres);
str = a2bstr("me");
hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
ok(V_VT(&var) == VT_DISPATCH, "Expected VT_DISPATCH, got %s\n", vt2a(&var));
ok(V_DISPATCH(&var) == disp, "Wrong dispatch returned for 'me'\n");
IDispatch_Release(disp);
......@@ -2747,14 +2747,14 @@ static void test_isexpression(void)
V_VT(&var) = VT_I2;
str = a2bstr("If True Then foo = 42 Else foo = 0\n");
hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, 0, &var, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
ok(V_VT(&var) == VT_EMPTY, "Expected VT_EMPTY, got %s\n", vt2a(&var));
VariantClear(&var);
SysFreeString(str);
str = a2bstr("foo\n\n");
hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
ok(V_VT(&var) == VT_I2, "Expected VT_I2, got %s\n", vt2a(&var));
ok(V_I2(&var) == 42, "Expected 42, got %d\n", V_I2(&var));
VariantClear(&var);
......@@ -2763,14 +2763,14 @@ static void test_isexpression(void)
str = a2bstr("foo : ");
SET_EXPECT(OnScriptError);
hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL);
ok(FAILED(hres), "ParseScriptText did not fail: %08x\n", hres);
ok(FAILED(hres), "ParseScriptText did not fail: %08lx\n", hres);
CHECK_CALLED(OnScriptError);
VariantClear(&var);
SysFreeString(str);
str = a2bstr("\"foo is \" & CStr(foo) \n \n\n ");
hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
ok(V_VT(&var) == VT_BSTR, "Expected VT_BSTR, got %s\n", vt2a(&var));
ok(!lstrcmpW(V_BSTR(&var), L"foo is 42"), "Wrong string, got %s\n", wine_dbgstr_w(V_BSTR(&var)));
VariantClear(&var);
......@@ -2780,12 +2780,12 @@ static void test_isexpression(void)
" test = x + 0.5\n"
"End Function\n");
hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
SysFreeString(str);
str = a2bstr("test(4) * 3\n");
hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
ok(V_VT(&var) == VT_R8, "Expected VT_R8, got %s\n", vt2a(&var));
ok(V_R8(&var) == 13.5, "Expected %lf, got %lf\n", 13.5, V_R8(&var));
VariantClear(&var);
......@@ -2797,12 +2797,12 @@ static void test_isexpression(void)
"Set obj = New C\n"
"obj.x = True\n");
hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
SysFreeString(str);
str = a2bstr("obj.x");
hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, SCRIPTTEXT_ISEXPRESSION, &var, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
ok(V_VT(&var) == VT_BOOL, "Expected VT_BOOL, got %s\n", vt2a(&var));
ok(V_BOOL(&var) == VARIANT_TRUE, "Expected %x, got %x\n", VARIANT_TRUE, V_BOOL(&var));
VariantClear(&var);
......@@ -2821,33 +2821,33 @@ static void test_multiple_parse(void)
script = create_and_init_script(SCRIPTITEM_GLOBALMEMBERS, TRUE);
hres = IActiveScript_QueryInterface(script, &IID_IActiveScriptParse, (void**)&parser);
ok(hres == S_OK, "Could not get IActiveScriptParseProcedure2 iface: %08x\n", hres);
ok(hres == S_OK, "Could not get IActiveScriptParseProcedure2 iface: %08lx\n", hres);
hres = IActiveScriptParse_ParseScriptText(parser,
L"function duplicatedfunc\n"
L" ok false, \"duplicatedfunc called\"\n"
L"end function\n",
NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
hres = IActiveScriptParse_ParseScriptText(parser,
L"sub duplicatedfunc\n"
L" ok false, \"duplicatedfunc called\"\n"
L"end sub\n",
NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
hres = IActiveScriptParse_ParseScriptText(parser,
L"function duplicatedfunc\n"
L" duplicatedfunc = 2\n"
L"end function\n",
NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
hres = IActiveScriptParse_ParseScriptText(parser,
L"ok duplicatedfunc() = 2, \"duplicatedfunc = \" & duplicatedfunc()\n",
NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
ok(hres == S_OK, "ParseScriptText failed: %08lx\n", hres);
IActiveScriptParse_Release(parser);
close_script(script);
......@@ -2862,7 +2862,7 @@ static BSTR get_script_from_file(const char *filename)
file = CreateFileA(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL);
if(file == INVALID_HANDLE_VALUE) {
trace("Could not open file: %u\n", GetLastError());
trace("Could not open file: %lu\n", GetLastError());
return NULL;
}
......@@ -2871,14 +2871,14 @@ static BSTR get_script_from_file(const char *filename)
map = CreateFileMappingW(file, NULL, PAGE_READONLY, 0, 0, NULL);
CloseHandle(file);
if(map == INVALID_HANDLE_VALUE) {
trace("Could not create file mapping: %u\n", GetLastError());
trace("Could not create file mapping: %lu\n", GetLastError());
return NULL;
}
file_map = MapViewOfFile(map, FILE_MAP_READ, 0, 0, 0);
CloseHandle(map);
if(!file_map) {
trace("MapViewOfFile failed: %u\n", GetLastError());
trace("MapViewOfFile failed: %lu\n", GetLastError());
return NULL;
}
......@@ -2903,7 +2903,7 @@ static void run_from_file(const char *filename)
strict_dispid_check = FALSE;
hres = parse_script(SCRIPTITEM_GLOBALMEMBERS, script_str, NULL);
SysFreeString(script_str);
ok(hres == S_OK, "parse_script failed: %08x\n", hres);
ok(hres == S_OK, "parse_script failed: %08lx\n", hres);
}
static void run_from_res(const char *name)
......@@ -2933,7 +2933,7 @@ static void run_from_res(const char *name)
CHECK_CALLED(global_success_d);
CHECK_CALLED(global_success_i);
ok(hres == S_OK, "parse_script failed: %08x\n", hres);
ok(hres == S_OK, "parse_script failed: %08lx\n", hres);
SysFreeString(str);
test_name = "";
}
......@@ -3006,7 +3006,7 @@ static void run_tests(void)
CHECK_CALLED(global_setobj_i);
hres = parse_script_ar("dim x\nx = testObj.rem");
ok(hres == S_OK, "use of 'rem' as dot identifier failed: %x08\n", hres);
ok(hres == S_OK, "use of 'rem' as dot identifier failed: %lx08\n", hres);
SET_EXPECT(testobj_propget_d);
SET_EXPECT(testobj_propget_i);
......@@ -3103,36 +3103,36 @@ static void run_tests(void)
SET_EXPECT(OnScriptError);
hres = parse_script_ar("throwInt(&h80080008&)");
ok(hres == 0x80080008, "hres = %08x\n", hres);
ok(hres == 0x80080008, "hres = %08lx\n", hres);
CHECK_CALLED(OnScriptError);
/* DISP_E_BADINDEX */
SET_EXPECT(OnScriptError);
hres = parse_script_ar("throwInt(&h8002000b&)");
ok(hres == MAKE_VBSERROR(9), "hres = %08x\n", hres);
ok(hres == MAKE_VBSERROR(9), "hres = %08lx\n", hres);
CHECK_CALLED(OnScriptError);
SET_EXPECT(OnScriptError);
hres = parse_script_ar("throwInt(&h800a0009&)");
ok(hres == MAKE_VBSERROR(9), "hres = %08x\n", hres);
ok(hres == MAKE_VBSERROR(9), "hres = %08lx\n", hres);
CHECK_CALLED(OnScriptError);
onerror_hres = S_OK;
SET_EXPECT(OnScriptError);
hres = parse_script_ar("throwInt(&h800a0009&)");
ok(hres == SCRIPT_E_REPORTED, "hres = %08x\n", hres);
ok(hres == SCRIPT_E_REPORTED, "hres = %08lx\n", hres);
CHECK_CALLED(OnScriptError);
/* E_NOTIMPL */
SET_EXPECT(OnScriptError);
hres = parse_script_ar("throwInt(&h80004001&)");
ok(hres == MAKE_VBSERROR(445), "hres = %08x\n", hres);
ok(hres == MAKE_VBSERROR(445), "hres = %08lx\n", hres);
CHECK_CALLED(OnScriptError);
onerror_hres = S_OK;
SET_EXPECT(OnScriptError);
hres = parse_script_ar("throwInt(&h80004001&)");
ok(hres == SCRIPT_E_REPORTED, "hres = %08x\n", hres);
ok(hres == SCRIPT_E_REPORTED, "hres = %08lx\n", hres);
CHECK_CALLED(OnScriptError);
SET_EXPECT(global_testoptionalarg_i);
......@@ -3220,7 +3220,7 @@ static BOOL check_vbscript(void)
&IID_IUnknown, (void**)&unk);
if(hres == REGDB_E_CLASSNOTREG)
return FALSE;
ok(hres == S_OK, "CoCreateInstance(CLSID_VBScriptRegExp) failed: %x\n", hres);
ok(hres == S_OK, "CoCreateInstance(CLSID_VBScriptRegExp) failed: %lx\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IRegExp2, (void**)&regexp);
if(SUCCEEDED(hres))
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment