mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 22:20:26 +00:00
dpnet: Add pointer tests and checks in EnumServiceProvider.
This commit is contained in:
parent
964c7d7305
commit
bf681bff2e
@ -130,6 +130,9 @@ static HRESULT WINAPI IDirectPlay8PeerImpl_EnumServiceProviders(IDirectPlay8Peer
|
||||
TRACE("(%p)->(%p,%p,%p,%p,%p,%x): stub\n", iface, pguidServiceProvider, pguidApplication, pSPInfoBuffer,
|
||||
pcbEnumData, pcReturned, dwFlags);
|
||||
|
||||
if(!pcReturned || !pcbEnumData)
|
||||
return E_POINTER;
|
||||
|
||||
if(!pguidServiceProvider)
|
||||
{
|
||||
req_size = sizeof(DPN_SERVICE_PROVIDER_INFO) + sizeof(dp_providerW);
|
||||
|
@ -59,6 +59,12 @@ static void test_enum_service_providers(void)
|
||||
size = 0;
|
||||
items = 0;
|
||||
|
||||
hr = IDirectPlay8Peer_EnumServiceProviders(peer, NULL, NULL, NULL, &size, NULL, 0);
|
||||
ok(hr == E_POINTER, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr);
|
||||
|
||||
hr = IDirectPlay8Peer_EnumServiceProviders(peer, NULL, NULL, NULL, NULL, &items, 0);
|
||||
ok(hr == E_POINTER, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr);
|
||||
|
||||
hr = IDirectPlay8Peer_EnumServiceProviders(peer, NULL, NULL, NULL, &size, &items, 0);
|
||||
ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr);
|
||||
ok(size != 0, "size is unexpectedly 0\n");
|
||||
|
Loading…
Reference in New Issue
Block a user