Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
1500a8a9
Commit
1500a8a9
authored
11 years ago
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
dpnet/tests: Add DirectPlay8Server tests.
parent
a7578c7a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/dpnet/tests/server.c
+42
-0
42 additions, 0 deletions
dlls/dpnet/tests/server.c
with
42 additions
and
0 deletions
dlls/dpnet/tests/server.c
+
42
−
0
View file @
1500a8a9
...
...
@@ -22,8 +22,27 @@
#include
<dplay8.h>
#include
"wine/test.h"
/* {CD0C3D4B-E15E-4CF2-9EA8-6E1D6548C5A5} */
static
const
GUID
appguid
=
{
0xcd0c3d4b
,
0xe15e
,
0x4cf2
,
{
0x9e
,
0xa8
,
0x6e
,
0x1d
,
0x65
,
0x48
,
0xc5
,
0xa5
}
};
static
WCHAR
sessionname
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
'g'
,
'a'
,
'm'
,
'e'
,
's'
,
's'
,
'e'
,
'r'
,
'v'
,
'e'
,
'r'
,
0
};
static
BOOL
nCreatePlayer
;
static
BOOL
nDestroyPlayer
;
static
HRESULT
WINAPI
DirectPlayMessageHandler
(
PVOID
pvUserContext
,
DWORD
dwMessageId
,
PVOID
pMsgBuffer
)
{
trace
(
"msgid: 0x%08x
\n
"
,
dwMessageId
);
switch
(
dwMessageId
)
{
case
DPN_MSGID_CREATE_PLAYER
:
nCreatePlayer
=
TRUE
;
break
;
case
DPN_MSGID_DESTROY_PLAYER
:
nDestroyPlayer
=
TRUE
;
break
;
}
return
S_OK
;
}
...
...
@@ -46,8 +65,31 @@ static void create_server(void)
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
IDirectPlay8Address
*
localaddr
=
NULL
;
DPN_APPLICATION_DESC
appdesc
;
hr
=
CoCreateInstance
(
&
CLSID_DirectPlay8Address
,
NULL
,
CLSCTX_ALL
,
&
IID_IDirectPlay8Address
,
(
LPVOID
*
)
&
localaddr
);
ok
(
hr
==
S_OK
,
"Failed to create IDirectPlay8Address object"
);
hr
=
IDirectPlay8Address_SetSP
(
localaddr
,
&
CLSID_DP8SP_TCPIP
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
memset
(
&
appdesc
,
0
,
sizeof
(
DPN_APPLICATION_DESC
)
);
appdesc
.
dwSize
=
sizeof
(
DPN_APPLICATION_DESC
);
appdesc
.
dwFlags
=
DPNSESSION_CLIENT_SERVER
;
appdesc
.
guidApplication
=
appguid
;
appdesc
.
pwszSessionName
=
sessionname
;
hr
=
IDirectPlay8Server_Host
(
server
,
&
appdesc
,
&
localaddr
,
1
,
NULL
,
NULL
,
NULL
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
nCreatePlayer
,
"No DPN_MSGID_CREATE_PLAYER Message
\n
"
);
ok
(
!
nDestroyPlayer
,
"Received DPN_MSGID_DESTROY_PLAYER Message
\n
"
);
hr
=
IDirectPlay8Server_Close
(
server
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
nDestroyPlayer
,
"No DPN_MSGID_DESTROY_PLAYER Message
\n
"
);
}
IDirectPlay8Server_Release
(
server
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment