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

itss/tests: Enable compilation with long types.

parent 0c25cf0a
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = itss.dll TESTDLL = itss.dll
IMPORTS = ole32 IMPORTS = ole32
......
...@@ -139,7 +139,7 @@ static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface, ...@@ -139,7 +139,7 @@ static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface,
ok(!szStatusText, "szStatusText != NULL\n"); ok(!szStatusText, "szStatusText != NULL\n");
break; break;
default: default:
ok(0, "unexpected ulStatusCode %d\n", ulStatusCode); ok(0, "unexpected ulStatusCode %ld\n", ulStatusCode);
break; break;
} }
...@@ -153,9 +153,9 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR ...@@ -153,9 +153,9 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR
ok(ulProgress == ulProgressMax, "ulProgress != ulProgressMax\n"); ok(ulProgress == ulProgressMax, "ulProgress != ulProgressMax\n");
if(test_protocol == ITS_PROTOCOL) if(test_protocol == ITS_PROTOCOL)
ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_DATAFULLYAVAILABLE), "grcf = %08x\n", grfBSCF); ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_DATAFULLYAVAILABLE), "grcf = %08lx\n", grfBSCF);
else else
ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION), "grcf = %08x\n", grfBSCF); ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION), "grcf = %08lx\n", grfBSCF);
if(read_protocol) { if(read_protocol) {
BYTE buf[100]; BYTE buf[100];
...@@ -163,8 +163,8 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR ...@@ -163,8 +163,8 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR
HRESULT hres; HRESULT hres;
hres = IInternetProtocol_Read(read_protocol, buf, sizeof(buf), &cb); hres = IInternetProtocol_Read(read_protocol, buf, sizeof(buf), &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres); ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(cb == 13, "cb=%u expected 13\n", cb); ok(cb == 13, "cb=%lu expected 13\n", cb);
ok(!memcmp(buf, "<html></html>", 13), "unexpected data\n"); ok(!memcmp(buf, "<html></html>", 13), "unexpected data\n");
} }
...@@ -176,8 +176,8 @@ static HRESULT WINAPI ProtocolSink_ReportResult(IInternetProtocolSink *iface, HR ...@@ -176,8 +176,8 @@ static HRESULT WINAPI ProtocolSink_ReportResult(IInternetProtocolSink *iface, HR
{ {
CHECK_EXPECT(ReportResult); CHECK_EXPECT(ReportResult);
ok(hrResult == expect_hrResult, "expected: %08x got: %08x\n", expect_hrResult, hrResult); ok(hrResult == expect_hrResult, "expected: %08lx got: %08lx\n", expect_hrResult, hrResult);
ok(dwError == 0, "dwError = %d\n", dwError); ok(dwError == 0, "dwError = %ld\n", dwError);
ok(!szResult, "szResult != NULL\n"); ok(!szResult, "szResult != NULL\n");
return S_OK; return S_OK;
...@@ -224,7 +224,7 @@ static HRESULT WINAPI BindInfo_GetBindInfo(IInternetBindInfo *iface, DWORD *grfB ...@@ -224,7 +224,7 @@ static HRESULT WINAPI BindInfo_GetBindInfo(IInternetBindInfo *iface, DWORD *grfB
if(grfBINDF) if(grfBINDF)
ok(!*grfBINDF, "*grfBINDF != 0\n"); ok(!*grfBINDF, "*grfBINDF != 0\n");
ok(pbindinfo != NULL, "pbindinfo == NULL\n"); ok(pbindinfo != NULL, "pbindinfo == NULL\n");
ok(pbindinfo->cbSize == sizeof(BINDINFO), "wrong size of pbindinfo: %d\n", pbindinfo->cbSize); ok(pbindinfo->cbSize == sizeof(BINDINFO), "wrong size of pbindinfo: %ld\n", pbindinfo->cbSize);
*grfBINDF = bindf; *grfBINDF = bindf;
return S_OK; return S_OK;
...@@ -258,7 +258,7 @@ static void test_protocol_fail(IInternetProtocol *protocol, LPCWSTR url, HRESULT ...@@ -258,7 +258,7 @@ static void test_protocol_fail(IInternetProtocol *protocol, LPCWSTR url, HRESULT
expect_hrResult = expected_hres; expect_hrResult = expected_hres;
hres = IInternetProtocol_Start(protocol, url, &protocol_sink, &bind_info, 0, 0); hres = IInternetProtocol_Start(protocol, url, &protocol_sink, &bind_info, 0, 0);
ok(hres == expected_hres, "expected: %08x got: %08x\n", expected_hres, hres); ok(hres == expected_hres, "expected: %08lx got: %08lx\n", expected_hres, hres);
CHECK_CALLED(GetBindInfo); CHECK_CALLED(GetBindInfo);
CHECK_CALLED(ReportResult); CHECK_CALLED(ReportResult);
...@@ -324,7 +324,7 @@ static void test_protocol_url(IClassFactory *factory, LPCWSTR url, BOOL expect_m ...@@ -324,7 +324,7 @@ static void test_protocol_url(IClassFactory *factory, LPCWSTR url, BOOL expect_m
HRESULT hres; HRESULT hres;
hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol); hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol);
ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); ok(hres == S_OK, "Could not get IInternetProtocol: %08lx\n", hres);
if(FAILED(hres)) if(FAILED(hres))
return; return;
...@@ -335,90 +335,90 @@ static void test_protocol_url(IClassFactory *factory, LPCWSTR url, BOOL expect_m ...@@ -335,90 +335,90 @@ static void test_protocol_url(IClassFactory *factory, LPCWSTR url, BOOL expect_m
} }
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres); ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(cb == 13, "cb=%u expected 13\n", cb); ok(cb == 13, "cb=%lu expected 13\n", cb);
ok(!memcmp(buf, "<html></html>", 13), "unexpected data\n"); ok(!memcmp(buf, "<html></html>", 13), "unexpected data\n");
ref = IInternetProtocol_Release(protocol); ref = IInternetProtocol_Release(protocol);
ok(!ref, "protocol ref=%d\n", ref); ok(!ref, "protocol ref=%ld\n", ref);
hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol); hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol);
ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); ok(hres == S_OK, "Could not get IInternetProtocol: %08lx\n", hres);
if(FAILED(hres)) if(FAILED(hres))
return; return;
cb = 0xdeadbeef; cb = 0xdeadbeef;
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == (test_protocol == ITS_PROTOCOL ? INET_E_DATA_NOT_AVAILABLE : E_FAIL), ok(hres == (test_protocol == ITS_PROTOCOL ? INET_E_DATA_NOT_AVAILABLE : E_FAIL),
"Read returned %08x\n", hres); "Read returned %08lx\n", hres);
ok(cb == 0xdeadbeef, "cb=%u expected 0xdeadbeef\n", cb); ok(cb == 0xdeadbeef, "cb=%lu expected 0xdeadbeef\n", cb);
protocol_start(protocol, url, expect_mime); protocol_start(protocol, url, expect_mime);
hres = IInternetProtocol_Read(protocol, buf, 2, &cb); hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres); ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(cb == 2, "cb=%u expected 2\n", cb); ok(cb == 2, "cb=%lu expected 2\n", cb);
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres); ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(cb == 11, "cb=%u, expected 11\n", cb); ok(cb == 11, "cb=%lu, expected 11\n", cb);
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == S_FALSE, "Read failed: %08x expected S_FALSE\n", hres); ok(hres == S_FALSE, "Read failed: %08lx expected S_FALSE\n", hres);
ok(cb == 0, "cb=%u expected 0\n", cb); ok(cb == 0, "cb=%lu expected 0\n", cb);
hres = IInternetProtocol_UnlockRequest(protocol); hres = IInternetProtocol_UnlockRequest(protocol);
ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres);
ref = IInternetProtocol_Release(protocol); ref = IInternetProtocol_Release(protocol);
ok(!ref, "protocol ref=%d\n", ref); ok(!ref, "protocol ref=%ld\n", ref);
hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol); hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol);
ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); ok(hres == S_OK, "Could not get IInternetProtocol: %08lx\n", hres);
if(FAILED(hres)) if(FAILED(hres))
return; return;
protocol_start(protocol, url, expect_mime); protocol_start(protocol, url, expect_mime);
hres = IInternetProtocol_Read(protocol, buf, 2, &cb); hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres); ok(hres == S_OK, "Read failed: %08lx\n", hres);
hres = IInternetProtocol_LockRequest(protocol, 0); hres = IInternetProtocol_LockRequest(protocol, 0);
ok(hres == S_OK, "LockRequest failed: %08x\n", hres); ok(hres == S_OK, "LockRequest failed: %08lx\n", hres);
hres = IInternetProtocol_UnlockRequest(protocol); hres = IInternetProtocol_UnlockRequest(protocol);
ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres); ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(cb == 11, "cb=%u, expected 11\n", cb); ok(cb == 11, "cb=%lu, expected 11\n", cb);
ref = IInternetProtocol_Release(protocol); ref = IInternetProtocol_Release(protocol);
ok(!ref, "protocol ref=%d\n", ref); ok(!ref, "protocol ref=%ld\n", ref);
hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol); hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol);
ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); ok(hres == S_OK, "Could not get IInternetProtocol: %08lx\n", hres);
if(FAILED(hres)) if(FAILED(hres))
return; return;
protocol_start(protocol, url, expect_mime); protocol_start(protocol, url, expect_mime);
hres = IInternetProtocol_LockRequest(protocol, 0); hres = IInternetProtocol_LockRequest(protocol, 0);
ok(hres == S_OK, "LockRequest failed: %08x\n", hres); ok(hres == S_OK, "LockRequest failed: %08lx\n", hres);
hres = IInternetProtocol_Terminate(protocol, 0); hres = IInternetProtocol_Terminate(protocol, 0);
ok(hres == S_OK, "Terminate failed: %08x\n", hres); ok(hres == S_OK, "Terminate failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, 2, &cb); hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres); ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(cb == 2, "cb=%u, expected 2\n", cb); ok(cb == 2, "cb=%lu, expected 2\n", cb);
hres = IInternetProtocol_UnlockRequest(protocol); hres = IInternetProtocol_UnlockRequest(protocol);
ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, 2, &cb); hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres); ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(cb == 2, "cb=%u, expected 2\n", cb); ok(cb == 2, "cb=%lu, expected 2\n", cb);
hres = IInternetProtocol_Terminate(protocol, 0); hres = IInternetProtocol_Terminate(protocol, 0);
ok(hres == S_OK, "Terminate failed: %08x\n", hres); ok(hres == S_OK, "Terminate failed: %08lx\n", hres);
hres = IInternetProtocol_Read(protocol, buf, 2, &cb); hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
ok(hres == S_OK, "Read failed: %08x\n", hres); ok(hres == S_OK, "Read failed: %08lx\n", hres);
ok(cb == 2, "cb=%u expected 2\n", cb); ok(cb == 2, "cb=%lu expected 2\n", cb);
ref = IInternetProtocol_Release(protocol); ref = IInternetProtocol_Release(protocol);
ok(!ref, "protocol ref=%d\n", ref); ok(!ref, "protocol ref=%ld\n", ref);
hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&read_protocol); hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&read_protocol);
ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); ok(hres == S_OK, "Could not get IInternetProtocol: %08lx\n", hres);
if(FAILED(hres)) if(FAILED(hres))
return; return;
protocol_start(read_protocol, url, expect_mime); protocol_start(read_protocol, url, expect_mime);
ref = IInternetProtocol_Release(read_protocol); ref = IInternetProtocol_Release(read_protocol);
ok(!ref, "protocol ref=%d\n", ref); ok(!ref, "protocol ref=%ld\n", ref);
read_protocol = NULL; read_protocol = NULL;
} }
...@@ -461,7 +461,7 @@ static void test_its_protocol_info(IInternetProtocol *protocol) ...@@ -461,7 +461,7 @@ static void test_its_protocol_info(IInternetProtocol *protocol)
HRESULT hres; HRESULT hres;
hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetProtocolInfo, (void**)&info); hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetProtocolInfo, (void**)&info);
ok(hres == S_OK, "Could not get IInternetProtocolInfo interface: %08x\n", hres); ok(hres == S_OK, "Could not get IInternetProtocolInfo interface: %08lx\n", hres);
if(FAILED(hres)) if(FAILED(hres))
return; return;
...@@ -470,7 +470,7 @@ static void test_its_protocol_info(IInternetProtocol *protocol) ...@@ -470,7 +470,7 @@ static void test_its_protocol_info(IInternetProtocol *protocol)
hres = IInternetProtocolInfo_ParseUrl(info, blank_url1, i, 0, buf, hres = IInternetProtocolInfo_ParseUrl(info, blank_url1, i, 0, buf,
ARRAY_SIZE(buf), &size, 0); ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_DEFAULT_ACTION, ok(hres == INET_E_DEFAULT_ACTION,
"[%d] failed: %08x, expected INET_E_DEFAULT_ACTION\n", i, hres); "[%ld] failed: %08lx, expected INET_E_DEFAULT_ACTION\n", i, hres);
} }
} }
...@@ -479,12 +479,12 @@ static void test_its_protocol_info(IInternetProtocol *protocol) ...@@ -479,12 +479,12 @@ static void test_its_protocol_info(IInternetProtocol *protocol)
memset(buf, 0xfe, sizeof(buf)); memset(buf, 0xfe, sizeof(buf));
hres = IInternetProtocolInfo_CombineUrl(info, combine_tests[i].base_url, hres = IInternetProtocolInfo_CombineUrl(info, combine_tests[i].base_url,
combine_tests[i].rel_url, combine_tests[i].flags, buf, ARRAY_SIZE(buf), &size, 0); combine_tests[i].rel_url, combine_tests[i].flags, buf, ARRAY_SIZE(buf), &size, 0);
ok(hres == combine_tests[i].hres, "[%d] CombineUrl returned %08x, expected %08x\n", ok(hres == combine_tests[i].hres, "[%ld] CombineUrl returned %08lx, expected %08lx\n",
i, hres, combine_tests[i].hres); i, hres, combine_tests[i].hres);
ok(size == (combine_tests[i].combined_url ? lstrlenW(combine_tests[i].combined_url)+1 ok(size == (combine_tests[i].combined_url ? lstrlenW(combine_tests[i].combined_url)+1
: 0xdeadbeef), "[%d] unexpected size=%d\n", i, size); : 0xdeadbeef), "[%ld] unexpected size=%ld\n", i, size);
if(combine_tests[i].combined_url) if(combine_tests[i].combined_url)
ok(!lstrcmpW(buf, combine_tests[i].combined_url), "[%d] unexpected result: %s\n", i, wine_dbgstr_w(buf)); ok(!lstrcmpW(buf, combine_tests[i].combined_url), "[%ld] unexpected result: %s\n", i, wine_dbgstr_w(buf));
else else
ok(buf[0] == 0xfefe, "buf changed\n"); ok(buf[0] == 0xfefe, "buf changed\n");
} }
...@@ -493,8 +493,8 @@ static void test_its_protocol_info(IInternetProtocol *protocol) ...@@ -493,8 +493,8 @@ static void test_its_protocol_info(IInternetProtocol *protocol)
memset(buf, 0xfe, sizeof(buf)); memset(buf, 0xfe, sizeof(buf));
hres = IInternetProtocolInfo_CombineUrl(info, L"its:test.chm::/blank.html", L"test.html", 0, buf, hres = IInternetProtocolInfo_CombineUrl(info, L"its:test.chm::/blank.html", L"test.html", 0, buf,
1, &size, 0); 1, &size, 0);
ok(hres == E_OUTOFMEMORY, "CombineUrl failed: %08x\n", hres); ok(hres == E_OUTOFMEMORY, "CombineUrl failed: %08lx\n", hres);
ok(size == 25, "size=%d\n", size); ok(size == 25, "size=%ld\n", size);
ok(buf[0] == 0xfefe, "buf changed\n"); ok(buf[0] == 0xfefe, "buf changed\n");
IInternetProtocolInfo_Release(info); IInternetProtocolInfo_Release(info);
...@@ -519,12 +519,12 @@ static void test_its_protocol(void) ...@@ -519,12 +519,12 @@ static void test_its_protocol(void)
hres = CoGetClassObject(&CLSID_ITSProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk); hres = CoGetClassObject(&CLSID_ITSProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk);
ok(hres == S_OK || ok(hres == S_OK ||
broken(hres == REGDB_E_CLASSNOTREG), /* Some W95 and NT4 */ broken(hres == REGDB_E_CLASSNOTREG), /* Some W95 and NT4 */
"CoGetClassObject failed: %08x\n", hres); "CoGetClassObject failed: %08lx\n", hres);
if(FAILED(hres)) if(FAILED(hres))
return; return;
hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&info); hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&info);
ok(hres == E_NOINTERFACE, "Could not get IInternetProtocolInfo: %08x\n", hres); ok(hres == E_NOINTERFACE, "Could not get IInternetProtocolInfo: %08lx\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IClassFactory, (void**)&factory); hres = IUnknown_QueryInterface(unk, &IID_IClassFactory, (void**)&factory);
ok(hres == S_OK, "Could not get IClassFactory interface\n"); ok(hres == S_OK, "Could not get IClassFactory interface\n");
...@@ -532,7 +532,7 @@ static void test_its_protocol(void) ...@@ -532,7 +532,7 @@ static void test_its_protocol(void)
IInternetProtocol *protocol; IInternetProtocol *protocol;
hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol); hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol);
ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); ok(hres == S_OK, "Could not get IInternetProtocol: %08lx\n", hres);
if(SUCCEEDED(hres)) { if(SUCCEEDED(hres)) {
test_its_protocol_info(protocol); test_its_protocol_info(protocol);
...@@ -542,14 +542,14 @@ static void test_its_protocol(void) ...@@ -542,14 +542,14 @@ static void test_its_protocol(void)
hres = IInternetProtocol_Start(protocol, wrong_url4, &protocol_sink, &bind_info, 0, 0); hres = IInternetProtocol_Start(protocol, wrong_url4, &protocol_sink, &bind_info, 0, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER,
"Start failed: %08x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", hres); "Start failed: %08lx, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", hres);
hres = IInternetProtocol_Start(protocol, wrong_url5, &protocol_sink, &bind_info, 0, 0); hres = IInternetProtocol_Start(protocol, wrong_url5, &protocol_sink, &bind_info, 0, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER,
"Start failed: %08x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", hres); "Start failed: %08lx, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", hres);
ref = IInternetProtocol_Release(protocol); ref = IInternetProtocol_Release(protocol);
ok(!ref, "protocol ref=%d\n", ref); ok(!ref, "protocol ref=%ld\n", ref);
test_protocol_url(factory, blank_url1, TRUE); test_protocol_url(factory, blank_url1, TRUE);
test_protocol_url(factory, blank_url2, TRUE); test_protocol_url(factory, blank_url2, TRUE);
...@@ -580,7 +580,7 @@ static void test_mk_protocol(void) ...@@ -580,7 +580,7 @@ static void test_mk_protocol(void)
(void**)&cf); (void**)&cf);
ok(hres == S_OK || ok(hres == S_OK ||
broken(hres == REGDB_E_CLASSNOTREG), /* Some W95 and NT4 */ broken(hres == REGDB_E_CLASSNOTREG), /* Some W95 and NT4 */
"CoGetClassObject failed: %08x\n", hres); "CoGetClassObject failed: %08lx\n", hres);
if(FAILED(hres)) if(FAILED(hres))
return; return;
...@@ -619,7 +619,7 @@ static void delete_chm(void) ...@@ -619,7 +619,7 @@ static void delete_chm(void)
BOOL ret; BOOL ret;
ret = DeleteFileA("test.chm"); ret = DeleteFileA("test.chm");
ok(ret, "DeleteFileA failed: %d\n", GetLastError()); ok(ret, "DeleteFileA failed: %ld\n", GetLastError());
} }
static const IID outer_test_iid = {0xabcabc00,0,0,{0,0,0,0,0,0,0,0x66}}; static const IID outer_test_iid = {0xabcabc00,0,0,{0,0,0,0,0,0,0,0x66}};
...@@ -659,18 +659,18 @@ static void test_com_aggregation(const CLSID *clsid) ...@@ -659,18 +659,18 @@ static void test_com_aggregation(const CLSID *clsid)
HRESULT hres; HRESULT hres;
hres = CoGetClassObject(clsid, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void**)&class_factory); hres = CoGetClassObject(clsid, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void**)&class_factory);
ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres); ok(hres == S_OK, "CoGetClassObject failed: %08lx\n", hres);
hres = IClassFactory_CreateInstance(class_factory, &outer, &IID_IUnknown, (void**)&unk); hres = IClassFactory_CreateInstance(class_factory, &outer, &IID_IUnknown, (void**)&unk);
ok(hres == S_OK, "CreateInstance returned: %08x\n", hres); ok(hres == S_OK, "CreateInstance returned: %08lx\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocol, (void**)&unk2); hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocol, (void**)&unk2);
ok(hres == S_OK, "Could not get IInternetProtocol iface: %08x\n", hres); ok(hres == S_OK, "Could not get IInternetProtocol iface: %08lx\n", hres);
SET_EXPECT(outer_QI_test); SET_EXPECT(outer_QI_test);
hres = IUnknown_QueryInterface(unk2, &outer_test_iid, (void**)&unk3); hres = IUnknown_QueryInterface(unk2, &outer_test_iid, (void**)&unk3);
CHECK_CALLED(outer_QI_test); CHECK_CALLED(outer_QI_test);
ok(hres == S_OK, "Could not get IInternetProtocol iface: %08x\n", hres); ok(hres == S_OK, "Could not get IInternetProtocol iface: %08lx\n", hres);
ok(unk3 == (IUnknown*)0xdeadbeef, "unexpected unk2\n"); ok(unk3 == (IUnknown*)0xdeadbeef, "unexpected unk2\n");
IUnknown_Release(unk2); IUnknown_Release(unk2);
...@@ -678,7 +678,7 @@ static void test_com_aggregation(const CLSID *clsid) ...@@ -678,7 +678,7 @@ static void test_com_aggregation(const CLSID *clsid)
unk = (void*)0xdeadbeef; unk = (void*)0xdeadbeef;
hres = IClassFactory_CreateInstance(class_factory, &outer, &IID_IInternetProtocol, (void**)&unk); hres = IClassFactory_CreateInstance(class_factory, &outer, &IID_IInternetProtocol, (void**)&unk);
ok(hres == CLASS_E_NOAGGREGATION, "CreateInstance returned: %08x\n", hres); ok(hres == CLASS_E_NOAGGREGATION, "CreateInstance returned: %08lx\n", hres);
ok(!unk, "unk = %p\n", unk); ok(!unk, "unk = %p\n", unk);
IClassFactory_Release(class_factory); IClassFactory_Release(class_factory);
......
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