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
2a63cf67
Commit
2a63cf67
authored
Apr 17, 2013
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Apr 18, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dplayx: Move the DirectPlayLobby data fields to the main object.
parent
185dd369
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
53 deletions
+16
-53
dplobby.c
dlls/dplayx/dplobby.c
+16
-53
No files found.
dlls/dplayx/dplobby.c
View file @
2a63cf67
...
...
@@ -63,13 +63,6 @@ struct DPLMSG
};
typedef
struct
DPLMSG
*
LPDPLMSG
;
typedef
struct
tagDirectPlayLobbyData
{
HKEY
hkCallbackKeyHack
;
DWORD
dwMsgThread
;
DPQ_HEAD
(
DPLMSG
)
msgs
;
/* List of messages received */
}
DirectPlayLobbyData
;
typedef
struct
IDirectPlayLobbyImpl
{
IDirectPlayLobby
IDirectPlayLobby_iface
;
...
...
@@ -81,7 +74,9 @@ typedef struct IDirectPlayLobbyImpl
LONG
numIfaces
;
/* "in use interfaces" refcount */
LONG
ref
,
refA
,
ref2
,
ref2A
,
ref3
,
ref3A
;
CRITICAL_SECTION
lock
;
DirectPlayLobbyData
*
dpl
;
HKEY
cbkeyhack
;
DWORD
msgtid
;
DPQ_HEAD
(
DPLMSG
)
msgs
;
/* List of messages received */
}
IDirectPlayLobbyImpl
;
static
inline
IDirectPlayLobbyImpl
*
impl_from_IDirectPlayLobby
(
IDirectPlayLobby
*
iface
)
...
...
@@ -114,41 +109,12 @@ static inline IDirectPlayLobbyImpl *impl_from_IDirectPlayLobby3A( IDirectPlayLob
return
CONTAINING_RECORD
(
iface
,
IDirectPlayLobbyImpl
,
IDirectPlayLobby3A_iface
);
}
static
BOOL
DPL_CreateLobby1
(
LPVOID
lpDPL
)
{
IDirectPlayLobbyImpl
*
This
=
lpDPL
;
This
->
dpl
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
(
This
->
dpl
)
)
);
if
(
This
->
dpl
==
NULL
)
{
return
FALSE
;
}
DPQ_INIT
(
This
->
dpl
->
msgs
);
return
TRUE
;
}
static
BOOL
DPL_DestroyLobby1
(
LPVOID
lpDPL
)
{
IDirectPlayLobbyImpl
*
This
=
lpDPL
;
if
(
This
->
dpl
->
dwMsgThread
)
{
FIXME
(
"Should kill the msg thread
\n
"
);
}
DPQ_DELETEQ
(
This
->
dpl
->
msgs
,
msgs
,
LPDPLMSG
,
cbDeleteElemFromHeap
);
/* Delete the contents */
HeapFree
(
GetProcessHeap
(),
0
,
This
->
dpl
);
return
TRUE
;
}
static
void
dplobby_destroy
(
IDirectPlayLobbyImpl
*
obj
)
{
DPL_DestroyLobby1
(
obj
);
if
(
obj
->
msgtid
)
FIXME
(
"Should kill the msg thread
\n
"
);
DPQ_DELETEQ
(
obj
->
msgs
,
msgs
,
LPDPLMSG
,
cbDeleteElemFromHeap
);
obj
->
lock
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
obj
->
lock
);
HeapFree
(
GetProcessHeap
(),
0
,
obj
);
...
...
@@ -995,7 +961,7 @@ static HRESULT WINAPI IDirectPlayLobby3AImpl_EnumLocalApplications( IDirectPlayL
EnterCriticalSection
(
&
This
->
lock
);
memcpy
(
&
This
->
dpl
->
hkCallbackKeyH
ack
,
&
hkServiceProvider
,
sizeof
(
hkServiceProvider
)
);
memcpy
(
&
This
->
cbkeyh
ack
,
&
hkServiceProvider
,
sizeof
(
hkServiceProvider
)
);
if
(
!
lpEnumLocalAppCallback
(
&
dplAppInfo
,
lpContext
,
dwFlags
)
)
{
...
...
@@ -1182,7 +1148,7 @@ static BOOL CALLBACK RunApplicationA_EnumLocalApplications
sizeOfReturnBuffer
=
200
;
/* Get all the appropriate data from the registry */
if
(
RegQueryValueExA
(
lpData
->
This
->
dpl
->
hkCallbackKeyH
ack
,
clSubKey
,
if
(
RegQueryValueExA
(
lpData
->
This
->
cbkeyh
ack
,
clSubKey
,
NULL
,
&
returnType
,
(
LPBYTE
)
returnBuffer
,
&
sizeOfReturnBuffer
)
!=
ERROR_SUCCESS
)
{
...
...
@@ -1196,7 +1162,7 @@ static BOOL CALLBACK RunApplicationA_EnumLocalApplications
sizeOfReturnBuffer
=
200
;
if
(
RegQueryValueExA
(
lpData
->
This
->
dpl
->
hkCallbackKeyH
ack
,
cdSubKey
,
if
(
RegQueryValueExA
(
lpData
->
This
->
cbkeyh
ack
,
cdSubKey
,
NULL
,
&
returnType
,
(
LPBYTE
)
returnBuffer
,
&
sizeOfReturnBuffer
)
!=
ERROR_SUCCESS
)
{
...
...
@@ -1210,7 +1176,7 @@ static BOOL CALLBACK RunApplicationA_EnumLocalApplications
sizeOfReturnBuffer
=
200
;
if
(
RegQueryValueExA
(
lpData
->
This
->
dpl
->
hkCallbackKeyH
ack
,
fileSubKey
,
if
(
RegQueryValueExA
(
lpData
->
This
->
cbkeyh
ack
,
fileSubKey
,
NULL
,
&
returnType
,
(
LPBYTE
)
returnBuffer
,
&
sizeOfReturnBuffer
)
!=
ERROR_SUCCESS
)
{
...
...
@@ -1224,7 +1190,7 @@ static BOOL CALLBACK RunApplicationA_EnumLocalApplications
sizeOfReturnBuffer
=
200
;
if
(
RegQueryValueExA
(
lpData
->
This
->
dpl
->
hkCallbackKeyH
ack
,
pathSubKey
,
if
(
RegQueryValueExA
(
lpData
->
This
->
cbkeyh
ack
,
pathSubKey
,
NULL
,
&
returnType
,
(
LPBYTE
)
returnBuffer
,
&
sizeOfReturnBuffer
)
!=
ERROR_SUCCESS
)
{
...
...
@@ -1433,10 +1399,9 @@ static HRESULT WINAPI IDirectPlayLobby3AImpl_RunApplication( IDirectPlayLobby3A
&
hStart
,
&
hDeath
,
&
hSettingRead
);
/* Setup the message thread ID */
This
->
dpl
->
dwMsgThread
=
CreateLobbyMessageReceptionThread
(
hReceiveEvent
,
hStart
,
hDeath
,
hSettingRead
);
This
->
msgtid
=
CreateLobbyMessageReceptionThread
(
hReceiveEvent
,
hStart
,
hDeath
,
hSettingRead
);
DPLAYX_SetLobbyMsgThreadId
(
newProcessInfo
.
dwProcessId
,
This
->
dpl
->
dwMsgThrea
d
);
DPLAYX_SetLobbyMsgThreadId
(
newProcessInfo
.
dwProcessId
,
This
->
msgti
d
);
LeaveCriticalSection
(
&
This
->
lock
);
...
...
@@ -2088,11 +2053,9 @@ HRESULT dplobby_create( REFIID riid, void **ppv )
InitializeCriticalSection
(
&
obj
->
lock
);
obj
->
lock
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": IDirectPlayLobbyImpl.lock"
);
DPQ_INIT
(
obj
->
msgs
);
if
(
DPL_CreateLobby1
(
obj
)
)
hr
=
IDirectPlayLobby_QueryInterface
(
&
obj
->
IDirectPlayLobby3_iface
,
riid
,
ppv
);
else
hr
=
DPERR_NOMEMORY
;
hr
=
IDirectPlayLobby_QueryInterface
(
&
obj
->
IDirectPlayLobby3_iface
,
riid
,
ppv
);
IDirectPlayLobby_Release
(
&
obj
->
IDirectPlayLobby3_iface
);
return
hr
;
...
...
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