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
aa5676bd
Commit
aa5676bd
authored
Mar 09, 2005
by
Raphael Junqueira
Committed by
Alexandre Julliard
Mar 09, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid ConvertToGlobalHandle calls.
parent
6f2f76c4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
dplobby.c
dlls/dplayx/dplobby.c
+8
-10
No files found.
dlls/dplayx/dplobby.c
View file @
aa5676bd
...
...
@@ -1156,22 +1156,16 @@ BOOL DPL_CreateAndSetLobbyHandles( DWORD dwDestProcessId, HANDLE hDestProcess,
LPHANDLE
lphRead
)
{
/* These are the handles for the created process */
HANDLE
hAppStart
,
hAppDeath
,
hAppRead
,
hTemp
;
HANDLE
hAppStart
=
0
,
hAppDeath
=
0
,
hAppRead
=
0
;
SECURITY_ATTRIBUTES
s_attrib
;
s_attrib
.
nLength
=
sizeof
(
s_attrib
);
s_attrib
.
lpSecurityDescriptor
=
NULL
;
s_attrib
.
bInheritHandle
=
TRUE
;
/* FIXME: Is there a handle leak here? */
hTemp
=
CreateEventW
(
&
s_attrib
,
TRUE
,
FALSE
,
NULL
);
*
lphStart
=
ConvertToGlobalHandle
(
hTemp
);
hTemp
=
CreateEventW
(
&
s_attrib
,
TRUE
,
FALSE
,
NULL
);
*
lphDeath
=
ConvertToGlobalHandle
(
hTemp
);
hTemp
=
CreateEventW
(
&
s_attrib
,
TRUE
,
FALSE
,
NULL
);
*
lphRead
=
ConvertToGlobalHandle
(
hTemp
);
*
lphStart
=
CreateEventW
(
&
s_attrib
,
TRUE
,
FALSE
,
NULL
);
*
lphDeath
=
CreateEventW
(
&
s_attrib
,
TRUE
,
FALSE
,
NULL
);
*
lphRead
=
CreateEventW
(
&
s_attrib
,
TRUE
,
FALSE
,
NULL
);
if
(
(
!
DuplicateHandle
(
GetCurrentProcess
(),
*
lphStart
,
hDestProcess
,
&
hAppStart
,
...
...
@@ -1184,6 +1178,9 @@ BOOL DPL_CreateAndSetLobbyHandles( DWORD dwDestProcessId, HANDLE hDestProcess,
0
,
FALSE
,
DUPLICATE_SAME_ACCESS
)
)
)
{
if
(
*
lphStart
)
{
CloseHandle
(
*
lphStart
);
*
lphStart
=
0
;
}
if
(
*
lphDeath
)
{
CloseHandle
(
*
lphDeath
);
*
lphDeath
=
0
;
}
if
(
*
lphRead
)
{
CloseHandle
(
*
lphRead
);
*
lphRead
=
0
;
}
/* FIXME: Handle leak... */
ERR
(
"Unable to dup handles
\n
"
);
return
FALSE
;
...
...
@@ -1192,6 +1189,7 @@ BOOL DPL_CreateAndSetLobbyHandles( DWORD dwDestProcessId, HANDLE hDestProcess,
if
(
!
DPLAYX_SetLobbyHandles
(
dwDestProcessId
,
hAppStart
,
hAppDeath
,
hAppRead
)
)
{
/* FIXME: Handle leak... */
return
FALSE
;
}
...
...
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