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
f23b4646
Commit
f23b4646
authored
Sep 26, 2014
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Sep 26, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dpnet: Show SetSP adds a component.
parent
9a5a5a36
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
0 deletions
+47
-0
address.c
dlls/dpnet/address.c
+3
-0
address.c
dlls/dpnet/tests/address.c
+44
-0
No files found.
dlls/dpnet/address.c
View file @
f23b4646
...
...
@@ -259,6 +259,9 @@ static HRESULT WINAPI IDirectPlay8AddressImpl_SetSP(IDirectPlay8Address *iface,
This
->
init
=
TRUE
;
This
->
SP_guid
=
*
pguidSP
;
IDirectPlay8Address_AddComponent
(
iface
,
DPNA_KEY_PROVIDER
,
&
This
->
SP_guid
,
sizeof
(
GUID
),
DPNA_DATATYPE_GUID
);
return
DPN_OK
;
}
...
...
dlls/dpnet/tests/address.c
View file @
f23b4646
...
...
@@ -171,6 +171,49 @@ static void address_addcomponents(void)
}
}
static
void
address_setsp
(
void
)
{
HRESULT
hr
;
IDirectPlay8Address
*
localaddr
=
NULL
;
hr
=
CoCreateInstance
(
&
CLSID_DirectPlay8Address
,
NULL
,
CLSCTX_ALL
,
&
IID_IDirectPlay8Address
,
(
LPVOID
*
)
&
localaddr
);
ok
(
hr
==
S_OK
,
"Failed to create IDirectPlay8Address object
\n
"
);
if
(
SUCCEEDED
(
hr
))
{
DWORD
components
;
WCHAR
*
name
;
GUID
guid
=
IID_Random
;
DWORD
type
;
DWORD
namelen
=
0
;
DWORD
bufflen
=
0
;
hr
=
IDirectPlay8Address_GetNumComponents
(
localaddr
,
&
components
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
components
==
0
,
"components=%d"
,
components
);
hr
=
IDirectPlay8Address_SetSP
(
localaddr
,
&
CLSID_DP8SP_TCPIP
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDirectPlay8Address_GetNumComponents
(
localaddr
,
&
components
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
components
==
1
,
"components=%d"
,
components
);
hr
=
IDirectPlay8Address_GetComponentByIndex
(
localaddr
,
0
,
NULL
,
&
namelen
,
NULL
,
&
bufflen
,
&
type
);
todo_wine
ok
(
hr
==
DPNERR_BUFFERTOOSMALL
,
"got 0x%08x
\n
"
,
hr
);
name
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
namelen
*
sizeof
(
WCHAR
));
hr
=
IDirectPlay8Address_GetComponentByIndex
(
localaddr
,
0
,
name
,
&
namelen
,
(
void
*
)
&
guid
,
&
bufflen
,
&
type
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
type
==
DPNA_DATATYPE_GUID
,
"wrong datatype: %d
\n
"
,
type
);
todo_wine
ok
(
IsEqualGUID
(
&
guid
,
&
CLSID_DP8SP_TCPIP
),
"wrong guid
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
name
);
IDirectPlay8Address_Release
(
localaddr
);
}
}
START_TEST
(
address
)
{
HRESULT
hr
;
...
...
@@ -182,6 +225,7 @@ START_TEST(address)
create_directplay_address
();
address_addcomponents
();
address_setsp
();
CoUninitialize
();
}
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