Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4a4678ca
Commit
4a4678ca
authored
Sep 18, 2011
by
Louis Lenders
Committed by
Alexandre Julliard
Sep 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dpnet: Return a TCP/IP provider in IDirectPlay8PeerImpl_EnumServiceProviders.
parent
7029559e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
10 deletions
+56
-10
peer.c
dlls/dpnet/peer.c
+47
-2
peer.c
dlls/dpnet/tests/peer.c
+9
-8
No files found.
dlls/dpnet/peer.c
View file @
4a4678ca
...
...
@@ -95,8 +95,53 @@ static HRESULT WINAPI IDirectPlay8PeerImpl_EnumServiceProviders(IDirectPlay8Peer
DPN_SERVICE_PROVIDER_INFO
*
const
pSPInfoBuffer
,
DWORD
*
const
pcbEnumData
,
DWORD
*
const
pcReturned
,
const
DWORD
dwFlags
)
{
FIXME
(
"(%p)->(%p,%p,%p,%p,%p,%x): stub
\n
"
,
iface
,
pguidServiceProvider
,
pguidApplication
,
pSPInfoBuffer
,
pcbEnumData
,
pcReturned
,
dwFlags
);
return
DPNERR_GENERIC
;
static
const
WCHAR
dp_providerW
[]
=
{
'D'
,
'i'
,
'r'
,
'e'
,
'c'
,
't'
,
'P'
,
'l'
,
'a'
,
'y'
,
'8'
,
' '
,
'T'
,
'C'
,
'P'
,
'/'
,
'I'
,
'P'
,
' '
,
'S'
,
'e'
,
'r'
,
'v'
,
'i'
,
'c'
,
'e'
,
' '
,
'P'
,
'r'
,
'o'
,
'v'
,
'i'
,
'd'
,
'e'
,
'r'
,
'\0'
};
static
const
WCHAR
dp_adapterW
[]
=
{
'L'
,
'o'
,
'c'
,
'a'
,
'l'
,
' '
,
'A'
,
'r'
,
'e'
,
'a'
,
' '
,
'C'
,
'o'
,
'n'
,
'n'
,
'e'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
' '
,
'-'
,
' '
,
'I'
,
'P'
,
'v'
,
'4'
,
'\0'
};
static
const
GUID
adapter_guid
=
{
0x4ce725f6
,
0xd3c0
,
0xdade
,
{
0xba
,
0x6f
,
0x11
,
0xf9
,
0x65
,
0xbc
,
0x42
,
0x99
}};
DWORD
req_size
;
TRACE
(
"(%p)->(%p,%p,%p,%p,%p,%x): stub
\n
"
,
iface
,
pguidServiceProvider
,
pguidApplication
,
pSPInfoBuffer
,
pcbEnumData
,
pcReturned
,
dwFlags
);
if
(
!
pguidServiceProvider
)
{
req_size
=
sizeof
(
DPN_SERVICE_PROVIDER_INFO
)
+
sizeof
(
dp_providerW
);
}
else
if
(
IsEqualGUID
(
pguidServiceProvider
,
&
CLSID_DP8SP_TCPIP
))
{
req_size
=
sizeof
(
DPN_SERVICE_PROVIDER_INFO
)
+
sizeof
(
dp_adapterW
);
}
else
{
FIXME
(
"Application requested a provider we don't handle (yet)
\n
"
);
*
pcReturned
=
0
;
return
DPNERR_DOESNOTEXIST
;
}
if
(
*
pcbEnumData
<
req_size
)
{
*
pcbEnumData
=
req_size
;
return
DPNERR_BUFFERTOOSMALL
;
}
pSPInfoBuffer
->
pwszName
=
(
LPWSTR
)(
pSPInfoBuffer
+
sizeof
(
DPN_SERVICE_PROVIDER_INFO
));
if
(
!
pguidServiceProvider
)
{
lstrcpyW
(
pSPInfoBuffer
->
pwszName
,
dp_providerW
);
pSPInfoBuffer
->
guid
=
CLSID_DP8SP_TCPIP
;
}
else
{
lstrcpyW
(
pSPInfoBuffer
->
pwszName
,
dp_adapterW
);
pSPInfoBuffer
->
guid
=
adapter_guid
;
}
*
pcReturned
=
1
;
return
DPN_OK
;
}
static
HRESULT
WINAPI
IDirectPlay8PeerImpl_CancelAsyncOperation
(
IDirectPlay8Peer
*
iface
,
...
...
dlls/dpnet/tests/peer.c
View file @
4a4678ca
...
...
@@ -67,14 +67,14 @@ static void test_enum_service_providers(void)
items
=
0
;
hr
=
IDirectPlay8Peer_EnumServiceProviders
(
peer
,
NULL
,
NULL
,
NULL
,
&
size
,
&
items
,
0
);
todo_wine
ok
(
hr
==
DPNERR_BUFFERTOOSMALL
,
"IDirectPlay8Peer_EnumServiceProviders failed with %x
\n
"
,
hr
);
todo_wine
ok
(
size
!=
0
,
"size is unexpectedly 0
\n
"
);
ok
(
hr
==
DPNERR_BUFFERTOOSMALL
,
"IDirectPlay8Peer_EnumServiceProviders failed with %x
\n
"
,
hr
);
ok
(
size
!=
0
,
"size is unexpectedly 0
\n
"
);
serv_prov_info
=
(
DPN_SERVICE_PROVIDER_INFO
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
hr
=
IDirectPlay8Peer_EnumServiceProviders
(
peer
,
NULL
,
NULL
,
serv_prov_info
,
&
size
,
&
items
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"IDirectPlay8Peer_EnumServiceProviders failed with %x
\n
"
,
hr
);
todo_wine
ok
(
items
!=
0
,
"Found unexpectedly no service providers
\n
"
);
ok
(
hr
==
S_OK
,
"IDirectPlay8Peer_EnumServiceProviders failed with %x
\n
"
,
hr
);
ok
(
items
!=
0
,
"Found unexpectedly no service providers
\n
"
);
trace
(
"number of items found: %d
\n
"
,
items
);
...
...
@@ -93,14 +93,15 @@ static void test_enum_service_providers(void)
items
=
0
;
hr
=
IDirectPlay8Peer_EnumServiceProviders
(
peer
,
&
CLSID_DP8SP_TCPIP
,
NULL
,
NULL
,
&
size
,
&
items
,
0
);
todo_wine
ok
(
hr
==
DPNERR_BUFFERTOOSMALL
,
"IDirectPlay8Peer_EnumServiceProviders failed with %x
\n
"
,
hr
);
todo_wine
ok
(
size
!=
0
,
"size is unexpectedly 0
\n
"
);
ok
(
hr
==
DPNERR_BUFFERTOOSMALL
,
"IDirectPlay8Peer_EnumServiceProviders failed with %x
\n
"
,
hr
);
ok
(
size
!=
0
,
"size is unexpectedly 0
\n
"
);
serv_prov_info
=
(
DPN_SERVICE_PROVIDER_INFO
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
hr
=
IDirectPlay8Peer_EnumServiceProviders
(
peer
,
&
CLSID_DP8SP_TCPIP
,
NULL
,
serv_prov_info
,
&
size
,
&
items
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"IDirectPlay8Peer_EnumServiceProviders failed with %x
\n
"
,
hr
);
todo_wine
ok
(
items
!=
0
,
"Found unexpectedly no adapter
\n
"
);
ok
(
hr
==
S_OK
,
"IDirectPlay8Peer_EnumServiceProviders failed with %x
\n
"
,
hr
);
ok
(
items
!=
0
,
"Found unexpectedly no adapter
\n
"
);
for
(
i
=
0
;
i
<
items
;
i
++
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment