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
a4d4d197
Commit
a4d4d197
authored
Dec 07, 2004
by
Juan Lang
Committed by
Alexandre Julliard
Dec 07, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use W calls rather than A in CreatePipe.
parent
d3fb100c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
sync.c
dlls/kernel/sync.c
+8
-4
No files found.
dlls/kernel/sync.c
View file @
a4d4d197
...
...
@@ -1477,7 +1477,7 @@ BOOL WINAPI CreatePipe( PHANDLE hReadPipe, PHANDLE hWritePipe,
LPSECURITY_ATTRIBUTES
sa
,
DWORD
size
)
{
static
unsigned
index
=
0
;
char
name
[
64
];
WCHAR
name
[
64
];
HANDLE
hr
,
hw
;
unsigned
in_index
=
index
;
...
...
@@ -1485,15 +1485,19 @@ BOOL WINAPI CreatePipe( PHANDLE hReadPipe, PHANDLE hWritePipe,
/* generate a unique pipe name (system wide) */
do
{
sprintf
(
name
,
"
\\\\
.
\\
pipe
\\
Win32.Pipes.%08lu.%08u"
,
GetCurrentProcessId
(),
++
index
);
hr
=
CreateNamedPipeA
(
name
,
PIPE_ACCESS_INBOUND
,
static
const
WCHAR
nameFmt
[]
=
{
'\\'
,
'\\'
,
'.'
,
'\\'
,
'p'
,
'i'
,
'p'
,
'e'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'3'
,
'2'
,
'.'
,
'P'
,
'i'
,
'p'
,
'e'
,
's'
,
'.'
,
'%'
,
'0'
,
'8'
,
'l'
,
'u'
,
'.'
,
'%'
,
'0'
,
'8'
,
'u'
,
'\0'
};
snprintfW
(
name
,
sizeof
(
name
)
/
sizeof
(
name
[
0
]),
nameFmt
,
GetCurrentProcessId
(),
++
index
);
hr
=
CreateNamedPipeW
(
name
,
PIPE_ACCESS_INBOUND
,
PIPE_TYPE_BYTE
|
PIPE_WAIT
,
1
,
size
,
size
,
NMPWAIT_USE_DEFAULT_WAIT
,
sa
);
}
while
(
hr
==
INVALID_HANDLE_VALUE
&&
index
!=
in_index
);
/* from completion sakeness, I think system resources might be exhausted before this happens !! */
if
(
hr
==
INVALID_HANDLE_VALUE
)
return
FALSE
;
hw
=
CreateFile
A
(
name
,
GENERIC_WRITE
,
0
,
sa
,
OPEN_EXISTING
,
0
,
0
);
hw
=
CreateFile
W
(
name
,
GENERIC_WRITE
,
0
,
sa
,
OPEN_EXISTING
,
0
,
0
);
if
(
hw
==
INVALID_HANDLE_VALUE
)
{
CloseHandle
(
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