mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 19:30:58 +00:00
hnetcfg/tests: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
47212b3939
commit
bcaecd5d81
|
@ -1,4 +1,3 @@
|
||||||
EXTRADEFS = -DWINE_NO_LONG_TYPES
|
|
||||||
TESTDLL = hnetcfg.dll
|
TESTDLL = hnetcfg.dll
|
||||||
IMPORTS = ole32 uuid oleaut32 advapi32 mpr
|
IMPORTS = ole32 uuid oleaut32 advapi32 mpr
|
||||||
|
|
||||||
|
|
|
@ -42,23 +42,23 @@ static void test_policy2_rules(INetFwPolicy2 *policy2)
|
||||||
INetFwServiceRestriction *restriction;
|
INetFwServiceRestriction *restriction;
|
||||||
|
|
||||||
hr = INetFwPolicy2_QueryInterface(policy2, &IID_INetFwRules, (void**)&rules);
|
hr = INetFwPolicy2_QueryInterface(policy2, &IID_INetFwRules, (void**)&rules);
|
||||||
ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
|
ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
|
||||||
|
|
||||||
hr = INetFwPolicy2_get_Rules(policy2, &rules);
|
hr = INetFwPolicy2_get_Rules(policy2, &rules);
|
||||||
ok(hr == S_OK, "got %08x\n", hr);
|
ok(hr == S_OK, "got %08lx\n", hr);
|
||||||
|
|
||||||
hr = INetFwPolicy2_get_Rules(policy2, &rules2);
|
hr = INetFwPolicy2_get_Rules(policy2, &rules2);
|
||||||
ok(hr == S_OK, "got %08x\n", hr);
|
ok(hr == S_OK, "got %08lx\n", hr);
|
||||||
ok(rules == rules2, "Different pointers\n");
|
ok(rules == rules2, "Different pointers\n");
|
||||||
|
|
||||||
hr = INetFwPolicy2_get_ServiceRestriction(policy2, &restriction);
|
hr = INetFwPolicy2_get_ServiceRestriction(policy2, &restriction);
|
||||||
todo_wine ok(hr == S_OK, "got %08x\n", hr);
|
todo_wine ok(hr == S_OK, "got %08lx\n", hr);
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
INetFwRules *rules3;
|
INetFwRules *rules3;
|
||||||
|
|
||||||
hr = INetFwServiceRestriction_get_Rules(restriction, &rules3);
|
hr = INetFwServiceRestriction_get_Rules(restriction, &rules3);
|
||||||
ok(hr == S_OK, "got %08x\n", hr);
|
ok(hr == S_OK, "got %08lx\n", hr);
|
||||||
ok(rules != rules3, "same pointers\n");
|
ok(rules != rules3, "same pointers\n");
|
||||||
|
|
||||||
if(rules3)
|
if(rules3)
|
||||||
|
@ -67,7 +67,7 @@ static void test_policy2_rules(INetFwPolicy2 *policy2)
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = INetFwRules_get__NewEnum(rules, NULL);
|
hr = INetFwRules_get__NewEnum(rules, NULL);
|
||||||
ok(hr == E_POINTER, "got %08x\n", hr);
|
ok(hr == E_POINTER, "got %08lx\n", hr);
|
||||||
|
|
||||||
INetFwRules_Release(rules);
|
INetFwRules_Release(rules);
|
||||||
INetFwRules_Release(rules2);
|
INetFwRules_Release(rules2);
|
||||||
|
@ -82,19 +82,19 @@ static void test_interfaces(void)
|
||||||
|
|
||||||
hr = CoCreateInstance(&CLSID_NetFwMgr, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
|
hr = CoCreateInstance(&CLSID_NetFwMgr, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
|
||||||
&IID_INetFwMgr, (void**)&manager);
|
&IID_INetFwMgr, (void**)&manager);
|
||||||
ok(hr == S_OK, "NetFwMgr create failed: %08x\n", hr);
|
ok(hr == S_OK, "NetFwMgr create failed: %08lx\n", hr);
|
||||||
|
|
||||||
hr = INetFwMgr_QueryInterface(manager, &IID_INetFwPolicy, (void**)&policy);
|
hr = INetFwMgr_QueryInterface(manager, &IID_INetFwPolicy, (void**)&policy);
|
||||||
ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
|
ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
|
||||||
|
|
||||||
hr = INetFwMgr_QueryInterface(manager, &IID_INetFwPolicy2, (void**)&policy2);
|
hr = INetFwMgr_QueryInterface(manager, &IID_INetFwPolicy2, (void**)&policy2);
|
||||||
ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
|
ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
|
||||||
|
|
||||||
hr = INetFwMgr_get_LocalPolicy(manager, &policy);
|
hr = INetFwMgr_get_LocalPolicy(manager, &policy);
|
||||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||||
|
|
||||||
hr = INetFwPolicy_QueryInterface(policy, &IID_INetFwPolicy2, (void**)&policy2);
|
hr = INetFwPolicy_QueryInterface(policy, &IID_INetFwPolicy2, (void**)&policy2);
|
||||||
ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
|
ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
|
||||||
|
|
||||||
INetFwPolicy_Release(policy);
|
INetFwPolicy_Release(policy);
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ static void test_interfaces(void)
|
||||||
INetFwPolicy2_Release(policy2);
|
INetFwPolicy2_Release(policy2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
win_skip("NetFwPolicy2 object is not supported: %08x\n", hr);
|
win_skip("NetFwPolicy2 object is not supported: %08lx\n", hr);
|
||||||
|
|
||||||
INetFwMgr_Release(manager);
|
INetFwMgr_Release(manager);
|
||||||
}
|
}
|
||||||
|
@ -126,27 +126,27 @@ static void test_NetFwAuthorizedApplication(void)
|
||||||
|
|
||||||
hr = CoCreateInstance(&CLSID_NetFwAuthorizedApplication, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
|
hr = CoCreateInstance(&CLSID_NetFwAuthorizedApplication, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
|
||||||
&IID_INetFwAuthorizedApplication, (void**)&app);
|
&IID_INetFwAuthorizedApplication, (void**)&app);
|
||||||
ok(hr == S_OK, "got: %08x\n", hr);
|
ok(hr == S_OK, "got: %08lx\n", hr);
|
||||||
|
|
||||||
hr = GetModuleFileNameW(NULL, image, ARRAY_SIZE(image));
|
hr = GetModuleFileNameW(NULL, image, ARRAY_SIZE(image));
|
||||||
ok(hr, "GetModuleFileName failed: %u\n", GetLastError());
|
ok(hr, "GetModuleFileName failed: %lu\n", GetLastError());
|
||||||
|
|
||||||
hr = INetFwAuthorizedApplication_get_ProcessImageFileName(app, NULL);
|
hr = INetFwAuthorizedApplication_get_ProcessImageFileName(app, NULL);
|
||||||
ok(hr == E_POINTER, "got: %08x\n", hr);
|
ok(hr == E_POINTER, "got: %08lx\n", hr);
|
||||||
|
|
||||||
hr = INetFwAuthorizedApplication_get_ProcessImageFileName(app, &bstr);
|
hr = INetFwAuthorizedApplication_get_ProcessImageFileName(app, &bstr);
|
||||||
ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_NOT_ENOUGH_MEMORY), "got: %08x\n", hr);
|
ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_NOT_ENOUGH_MEMORY), "got: %08lx\n", hr);
|
||||||
ok(!bstr, "got: %s\n", wine_dbgstr_w(bstr));
|
ok(!bstr, "got: %s\n", wine_dbgstr_w(bstr));
|
||||||
|
|
||||||
hr = INetFwAuthorizedApplication_put_ProcessImageFileName(app, NULL);
|
hr = INetFwAuthorizedApplication_put_ProcessImageFileName(app, NULL);
|
||||||
ok(hr == E_INVALIDARG || hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "got: %08x\n", hr);
|
ok(hr == E_INVALIDARG || hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "got: %08lx\n", hr);
|
||||||
|
|
||||||
hr = INetFwAuthorizedApplication_put_ProcessImageFileName(app, empty);
|
hr = INetFwAuthorizedApplication_put_ProcessImageFileName(app, empty);
|
||||||
ok(hr == E_INVALIDARG || hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "got: %08x\n", hr);
|
ok(hr == E_INVALIDARG || hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "got: %08lx\n", hr);
|
||||||
|
|
||||||
bstr = SysAllocString(image);
|
bstr = SysAllocString(image);
|
||||||
hr = INetFwAuthorizedApplication_put_ProcessImageFileName(app, bstr);
|
hr = INetFwAuthorizedApplication_put_ProcessImageFileName(app, bstr);
|
||||||
ok(hr == S_OK, "got: %08x\n", hr);
|
ok(hr == S_OK, "got: %08lx\n", hr);
|
||||||
SysFreeString(bstr);
|
SysFreeString(bstr);
|
||||||
|
|
||||||
GetFullPathNameW(image, ARRAY_SIZE(fullpath), fullpath, NULL);
|
GetFullPathNameW(image, ARRAY_SIZE(fullpath), fullpath, NULL);
|
||||||
|
@ -162,7 +162,7 @@ static void test_NetFwAuthorizedApplication(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = INetFwAuthorizedApplication_get_ProcessImageFileName(app, &bstr);
|
hr = INetFwAuthorizedApplication_get_ProcessImageFileName(app, &bstr);
|
||||||
ok(hr == S_OK, "got: %08x\n", hr);
|
ok(hr == S_OK, "got: %08lx\n", hr);
|
||||||
ok(!lstrcmpW(bstr,info->lpUniversalName), "expected %s, got %s\n",
|
ok(!lstrcmpW(bstr,info->lpUniversalName), "expected %s, got %s\n",
|
||||||
wine_dbgstr_w(info->lpUniversalName), wine_dbgstr_w(bstr));
|
wine_dbgstr_w(info->lpUniversalName), wine_dbgstr_w(bstr));
|
||||||
SysFreeString(bstr);
|
SysFreeString(bstr);
|
||||||
|
@ -184,21 +184,21 @@ static void test_static_port_mapping_collection( IStaticPortMappingCollection *p
|
||||||
|
|
||||||
refcount = get_refcount((IUnknown *)ports);
|
refcount = get_refcount((IUnknown *)ports);
|
||||||
hr = IStaticPortMappingCollection_get__NewEnum(ports, &unk);
|
hr = IStaticPortMappingCollection_get__NewEnum(ports, &unk);
|
||||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||||
|
|
||||||
hr = IUnknown_QueryInterface(unk, &IID_IEnumVARIANT, (void **)&enum_ports);
|
hr = IUnknown_QueryInterface(unk, &IID_IEnumVARIANT, (void **)&enum_ports);
|
||||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||||
IUnknown_Release( unk );
|
IUnknown_Release( unk );
|
||||||
|
|
||||||
refcount2 = get_refcount((IUnknown *)ports);
|
refcount2 = get_refcount((IUnknown *)ports);
|
||||||
ok(refcount2 == refcount, "Got unexpected refcount %u, refcount2 %u.\n", refcount, refcount2);
|
ok(refcount2 == refcount, "Got unexpected refcount %lu, refcount2 %lu.\n", refcount, refcount2);
|
||||||
|
|
||||||
hr = IEnumVARIANT_Reset(enum_ports);
|
hr = IEnumVARIANT_Reset(enum_ports);
|
||||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||||
|
|
||||||
count = 0xdeadbeef;
|
count = 0xdeadbeef;
|
||||||
hr = IStaticPortMappingCollection_get_Count(ports, &count);
|
hr = IStaticPortMappingCollection_get_Count(ports, &count);
|
||||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||||
|
|
||||||
hr = IStaticPortMappingCollection_get_Item(ports, 12345, (BSTR)L"UDP", &pm);
|
hr = IStaticPortMappingCollection_get_Item(ports, 12345, (BSTR)L"UDP", &pm);
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
|
@ -213,35 +213,35 @@ static void test_static_port_mapping_collection( IStaticPortMappingCollection *p
|
||||||
|
|
||||||
hr = IStaticPortMappingCollection_Add(ports, 12345, (BSTR)L"udp", 12345, (BSTR)L"1.2.3.4",
|
hr = IStaticPortMappingCollection_Add(ports, 12345, (BSTR)L"udp", 12345, (BSTR)L"1.2.3.4",
|
||||||
VARIANT_TRUE, (BSTR)L"wine_test", &pm);
|
VARIANT_TRUE, (BSTR)L"wine_test", &pm);
|
||||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
|
||||||
hr = IStaticPortMappingCollection_Add(ports, 12345, (BSTR)L"UDP", 12345, (BSTR)L"1.2.3.4",
|
hr = IStaticPortMappingCollection_Add(ports, 12345, (BSTR)L"UDP", 12345, (BSTR)L"1.2.3.4",
|
||||||
VARIANT_TRUE, (BSTR)L"wine_test", &pm);
|
VARIANT_TRUE, (BSTR)L"wine_test", &pm);
|
||||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||||
|
|
||||||
hr = IStaticPortMappingCollection_get_Count(ports, &count2);
|
hr = IStaticPortMappingCollection_get_Count(ports, &count2);
|
||||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||||
ok(count2 == expected_count, "Got unexpected count2 %u, expected %u.\n", count2, expected_count);
|
ok(count2 == expected_count, "Got unexpected count2 %lu, expected %lu.\n", count2, expected_count);
|
||||||
|
|
||||||
hr = IStaticPortMappingCollection_get_Item(ports, 12345, NULL, &pm);
|
hr = IStaticPortMappingCollection_get_Item(ports, 12345, NULL, &pm);
|
||||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
|
||||||
|
|
||||||
hr = IStaticPortMappingCollection_get_Item(ports, 12345, (BSTR)L"UDP", NULL);
|
hr = IStaticPortMappingCollection_get_Item(ports, 12345, (BSTR)L"UDP", NULL);
|
||||||
ok(hr == E_POINTER, "Got unexpected hr %#x.\n", hr);
|
ok(hr == E_POINTER, "Got unexpected hr %#lx.\n", hr);
|
||||||
|
|
||||||
hr = IStaticPortMappingCollection_get_Item(ports, 12345, (BSTR)L"udp", &pm);
|
hr = IStaticPortMappingCollection_get_Item(ports, 12345, (BSTR)L"udp", &pm);
|
||||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
|
||||||
|
|
||||||
hr = IStaticPortMappingCollection_get_Item(ports, -1, (BSTR)L"UDP", &pm);
|
hr = IStaticPortMappingCollection_get_Item(ports, -1, (BSTR)L"UDP", &pm);
|
||||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
|
||||||
|
|
||||||
hr = IStaticPortMappingCollection_get_Item(ports, 65536, (BSTR)L"UDP", &pm);
|
hr = IStaticPortMappingCollection_get_Item(ports, 65536, (BSTR)L"UDP", &pm);
|
||||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
|
||||||
|
|
||||||
hr = IStaticPortMappingCollection_get_Item(ports, 12346, (BSTR)L"UDP", &pm);
|
hr = IStaticPortMappingCollection_get_Item(ports, 12346, (BSTR)L"UDP", &pm);
|
||||||
ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Got unexpected hr %#x.\n", hr);
|
ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Got unexpected hr %#lx.\n", hr);
|
||||||
|
|
||||||
hr = IEnumVARIANT_Reset(enum_ports);
|
hr = IEnumVARIANT_Reset(enum_ports);
|
||||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||||
|
|
||||||
for (i = 0; i < count2; ++i)
|
for (i = 0; i < count2; ++i)
|
||||||
{
|
{
|
||||||
|
@ -249,23 +249,23 @@ static void test_static_port_mapping_collection( IStaticPortMappingCollection *p
|
||||||
|
|
||||||
fetched = 0xdeadbeef;
|
fetched = 0xdeadbeef;
|
||||||
hr = IEnumVARIANT_Next(enum_ports, 1, &var, &fetched);
|
hr = IEnumVARIANT_Next(enum_ports, 1, &var, &fetched);
|
||||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||||
ok(fetched == 1, "Got unexpected fetched %u.\n", fetched);
|
ok(fetched == 1, "Got unexpected fetched %lu.\n", fetched);
|
||||||
ok(V_VT(&var) == VT_DISPATCH, "Got unexpected variant type %u.\n", V_VT(&var));
|
ok(V_VT(&var) == VT_DISPATCH, "Got unexpected variant type %u.\n", V_VT(&var));
|
||||||
|
|
||||||
hr = IDispatch_QueryInterface(V_DISPATCH(&var), &IID_IStaticPortMapping, (void **)&pm);
|
hr = IDispatch_QueryInterface(V_DISPATCH(&var), &IID_IStaticPortMapping, (void **)&pm);
|
||||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||||
|
|
||||||
hr = IStaticPortMapping_get_Protocol(pm, &protocol);
|
hr = IStaticPortMapping_get_Protocol(pm, &protocol);
|
||||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||||
external_port = 0xdeadbeef;
|
external_port = 0xdeadbeef;
|
||||||
hr = IStaticPortMapping_get_ExternalPort(pm, &external_port);
|
hr = IStaticPortMapping_get_ExternalPort(pm, &external_port);
|
||||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||||
|
|
||||||
ok(!wcscmp(protocol, L"UDP") || !wcscmp(protocol, L"TCP"), "Got unexpected protocol %s.\n",
|
ok(!wcscmp(protocol, L"UDP") || !wcscmp(protocol, L"TCP"), "Got unexpected protocol %s.\n",
|
||||||
debugstr_w(protocol));
|
debugstr_w(protocol));
|
||||||
hr = IStaticPortMappingCollection_get_Item(ports, external_port, protocol, &pm2);
|
hr = IStaticPortMappingCollection_get_Item(ports, external_port, protocol, &pm2);
|
||||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||||
ok(pm2 != pm, "Got same interface.\n");
|
ok(pm2 != pm, "Got same interface.\n");
|
||||||
|
|
||||||
IStaticPortMapping_Release(pm);
|
IStaticPortMapping_Release(pm);
|
||||||
|
@ -276,10 +276,10 @@ static void test_static_port_mapping_collection( IStaticPortMappingCollection *p
|
||||||
VariantClear(&var);
|
VariantClear(&var);
|
||||||
}
|
}
|
||||||
hr = IEnumVARIANT_Next(enum_ports, 1, &var, &fetched);
|
hr = IEnumVARIANT_Next(enum_ports, 1, &var, &fetched);
|
||||||
ok(hr == S_FALSE, "Got unexpected hr %#x.\n", hr);
|
ok(hr == S_FALSE, "Got unexpected hr %#lx.\n", hr);
|
||||||
|
|
||||||
hr = IStaticPortMappingCollection_Remove(ports, 12345, (BSTR)L"UDP");
|
hr = IStaticPortMappingCollection_Remove(ports, 12345, (BSTR)L"UDP");
|
||||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||||
|
|
||||||
IEnumVARIANT_Release(enum_ports);
|
IEnumVARIANT_Release(enum_ports);
|
||||||
}
|
}
|
||||||
|
@ -295,19 +295,19 @@ static void test_IUPnPNAT(void)
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
hr = CoCreateInstance(&CLSID_UPnPNAT, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IUPnPNAT, (void**)&nat);
|
hr = CoCreateInstance(&CLSID_UPnPNAT, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IUPnPNAT, (void**)&nat);
|
||||||
ok(hr == S_OK, "got: %08x\n", hr);
|
ok(hr == S_OK, "got: %08lx\n", hr);
|
||||||
|
|
||||||
hr = IUPnPNAT_QueryInterface(nat, &IID_IProvideClassInfo, (void**)&provider);
|
hr = IUPnPNAT_QueryInterface(nat, &IID_IProvideClassInfo, (void**)&provider);
|
||||||
ok(hr == E_NOINTERFACE, "got: %08x\n", hr);
|
ok(hr == E_NOINTERFACE, "got: %08lx\n", hr);
|
||||||
|
|
||||||
refcount = get_refcount((IUnknown *)nat);
|
refcount = get_refcount((IUnknown *)nat);
|
||||||
hr = IUPnPNAT_get_StaticPortMappingCollection(nat, &static_ports);
|
hr = IUPnPNAT_get_StaticPortMappingCollection(nat, &static_ports);
|
||||||
|
|
||||||
ok(hr == S_OK, "got: %08x\n", hr);
|
ok(hr == S_OK, "got: %08lx\n", hr);
|
||||||
if(hr == S_OK && static_ports)
|
if(hr == S_OK && static_ports)
|
||||||
{
|
{
|
||||||
refcount2 = get_refcount((IUnknown *)nat);
|
refcount2 = get_refcount((IUnknown *)nat);
|
||||||
ok(refcount2 == refcount, "Got unexpected refcount %u, refcount2 %u.\n", refcount, refcount2);
|
ok(refcount2 == refcount, "Got unexpected refcount %lu, refcount2 %lu.\n", refcount, refcount2);
|
||||||
test_static_port_mapping_collection( static_ports );
|
test_static_port_mapping_collection( static_ports );
|
||||||
IStaticPortMappingCollection_Release(static_ports);
|
IStaticPortMappingCollection_Release(static_ports);
|
||||||
}
|
}
|
||||||
|
@ -316,12 +316,12 @@ static void test_IUPnPNAT(void)
|
||||||
skip( "UPNP gateway not found.\n" );
|
skip( "UPNP gateway not found.\n" );
|
||||||
}
|
}
|
||||||
hr = IUPnPNAT_get_DynamicPortMappingCollection(nat, &dync_ports);
|
hr = IUPnPNAT_get_DynamicPortMappingCollection(nat, &dync_ports);
|
||||||
ok(hr == S_OK || hr == E_NOTIMPL /* Windows 8.1 */, "got: %08x\n", hr);
|
ok(hr == S_OK || hr == E_NOTIMPL /* Windows 8.1 */, "got: %08lx\n", hr);
|
||||||
if(hr == S_OK && dync_ports)
|
if(hr == S_OK && dync_ports)
|
||||||
IDynamicPortMappingCollection_Release(dync_ports);
|
IDynamicPortMappingCollection_Release(dync_ports);
|
||||||
|
|
||||||
hr = IUPnPNAT_get_NATEventManager(nat, &manager);
|
hr = IUPnPNAT_get_NATEventManager(nat, &manager);
|
||||||
todo_wine ok(hr == S_OK, "got: %08x\n", hr);
|
todo_wine ok(hr == S_OK, "got: %08lx\n", hr);
|
||||||
if(hr == S_OK && manager)
|
if(hr == S_OK && manager)
|
||||||
INATEventManager_Release(manager);
|
INATEventManager_Release(manager);
|
||||||
|
|
||||||
|
@ -339,7 +339,7 @@ START_TEST(policy)
|
||||||
&IID_INetFwMgr, (void**)&manager);
|
&IID_INetFwMgr, (void**)&manager);
|
||||||
if(FAILED(hr))
|
if(FAILED(hr))
|
||||||
{
|
{
|
||||||
win_skip("NetFwMgr object is not supported: %08x\n", hr);
|
win_skip("NetFwMgr object is not supported: %08lx\n", hr);
|
||||||
CoUninitialize();
|
CoUninitialize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue