Commit bc85fee0 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

dpnet: Implement IDirectPlay8Client EnumServiceProviders.

parent e21c5732
......@@ -125,8 +125,16 @@ static HRESULT WINAPI IDirectPlay8ClientImpl_EnumServiceProviders(IDirectPlay8Cl
PDWORD const pcReturned, const DWORD dwFlags)
{
IDirectPlay8ClientImpl *This = impl_from_IDirectPlay8Client(iface);
FIXME("(%p):(%x): Stub\n", This, dwFlags);
return DPN_OK;
TRACE("(%p)->(%s,%s,%p,%p,%p,%x)\n", This, debugstr_guid(pguidServiceProvider), debugstr_guid(pguidApplication),
pSPInfoBuffer, pcbEnumData, pcReturned, dwFlags);
if(dwFlags)
FIXME("Unhandled flags %x\n", dwFlags);
if(pguidApplication)
FIXME("Application guid %s is currently being ignored\n", debugstr_guid(pguidApplication));
return enum_services_providers(pguidServiceProvider, pSPInfoBuffer, pcbEnumData, pcReturned);
}
static HRESULT WINAPI IDirectPlay8ClientImpl_EnumHosts(IDirectPlay8Client *iface,
......
......@@ -137,6 +137,8 @@ extern HRESULT DPNET_CreateDirectPlay8LobbyClient(IClassFactory *iface, IUnknown
extern void init_dpn_sp_caps(DPN_SP_CAPS *dpnspcaps) DECLSPEC_HIDDEN;
extern void init_winsock(void) DECLSPEC_HIDDEN;
extern HRESULT enum_services_providers(const GUID * const service, DPN_SERVICE_PROVIDER_INFO * const info_buffer,
DWORD * const buf_size, DWORD * const returned) DECLSPEC_HIDDEN;
/* used for generic dumping (copied from ddraw) */
typedef struct {
......
......@@ -126,7 +126,7 @@ static HRESULT WINAPI IDirectPlay8PeerImpl_Initialize(IDirectPlay8Peer *iface,
return DPN_OK;
}
static HRESULT enum_services_providers(const GUID * const service, DPN_SERVICE_PROVIDER_INFO * const info_buffer,
HRESULT enum_services_providers(const GUID * const service, DPN_SERVICE_PROVIDER_INFO * const info_buffer,
DWORD * const buf_size, DWORD * const returned)
{
static const WCHAR serviceproviders[] = {'S','O','F','T','W','A','R','E','\\','M','i','c','r','o','s','o','f','t','\\',
......
......@@ -97,20 +97,20 @@ static void test_enum_service_providers(void)
items = 0;
hr = IDirectPlay8Client_EnumServiceProviders(client, NULL, NULL, NULL, &size, NULL, 0);
todo_wine ok(hr == E_POINTER, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr);
ok(hr == E_POINTER, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr);
hr = IDirectPlay8Client_EnumServiceProviders(client, NULL, NULL, NULL, NULL, &items, 0);
todo_wine ok(hr == E_POINTER, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr);
ok(hr == E_POINTER, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr);
hr = IDirectPlay8Client_EnumServiceProviders(client, NULL, NULL, NULL, &size, &items, 0);
todo_wine ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr);
todo_wine ok(size != 0, "size is unexpectedly 0\n");
ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr);
ok(size != 0, "size is unexpectedly 0\n");
serv_prov_info = HeapAlloc(GetProcessHeap(), 0, size);
hr = IDirectPlay8Client_EnumServiceProviders(client, NULL, NULL, serv_prov_info, &size, &items, 0);
ok(hr == S_OK, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr);
todo_wine ok(items != 0, "Found unexpectedly no service providers\n");
ok(items != 0, "Found unexpectedly no service providers\n");
trace("number of items found: %d\n", items);
......@@ -126,14 +126,14 @@ static void test_enum_service_providers(void)
items = 0;
hr = IDirectPlay8Client_EnumServiceProviders(client, &CLSID_DP8SP_TCPIP, NULL, NULL, &size, &items, 0);
todo_wine ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr);
todo_wine ok(size != 0, "size is unexpectedly 0\n");
ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr);
ok(size != 0, "size is unexpectedly 0\n");
serv_prov_info = HeapAlloc(GetProcessHeap(), 0, size);
hr = IDirectPlay8Client_EnumServiceProviders(client, &CLSID_DP8SP_TCPIP, NULL, serv_prov_info, &size, &items, 0);
ok(hr == S_OK, "IDirectPlay8Client_EnumServiceProviders failed with %x\n", hr);
todo_wine ok(items != 0, "Found unexpectedly no adapter\n");
ok(items != 0, "Found unexpectedly no adapter\n");
for (i=0;i<items;i++)
......
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