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
ff07c204
Commit
ff07c204
authored
Apr 30, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved support for opening named pipes to ntdll.
parent
58447bcd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
31 deletions
+22
-31
file.c
dlls/ntdll/file.c
+19
-0
file.c
files/file.c
+3
-31
No files found.
dlls/ntdll/file.c
View file @
ff07c204
...
...
@@ -130,6 +130,7 @@ NTSTATUS WINAPI NtCreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATTRIB
ULONG
attributes
,
ULONG
sharing
,
ULONG
disposition
,
ULONG
options
,
PVOID
ea_buffer
,
ULONG
ea_length
)
{
static
const
WCHAR
pipeW
[]
=
{
'\\'
,
'?'
,
'?'
,
'\\'
,
'p'
,
'i'
,
'p'
,
'e'
,
'\\'
};
ANSI_STRING
unix_name
;
int
created
=
FALSE
;
...
...
@@ -146,6 +147,24 @@ NTSTATUS WINAPI NtCreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATTRIB
}
if
(
alloc_size
)
FIXME
(
"alloc_size not supported
\n
"
);
/* check for named pipe */
if
(
attr
->
ObjectName
->
Length
>
sizeof
(
pipeW
)
&&
!
memicmpW
(
attr
->
ObjectName
->
Buffer
,
pipeW
,
sizeof
(
pipeW
)
/
sizeof
(
WCHAR
)
))
{
SERVER_START_REQ
(
open_named_pipe
)
{
req
->
access
=
access
;
req
->
inherit
=
(
attr
->
Attributes
&
OBJ_INHERIT
)
!=
0
;
wine_server_add_data
(
req
,
attr
->
ObjectName
->
Buffer
+
sizeof
(
pipeW
)
/
sizeof
(
WCHAR
),
attr
->
ObjectName
->
Length
-
sizeof
(
pipeW
)
);
io
->
u
.
Status
=
wine_server_call
(
req
);
*
handle
=
reply
->
handle
;
}
SERVER_END_REQ
;
return
io
->
u
.
Status
;
}
io
->
u
.
Status
=
wine_nt_to_unix_file_name
(
attr
->
ObjectName
,
&
unix_name
,
disposition
,
!
(
attr
->
Attributes
&
OBJ_CASE_INSENSITIVE
)
);
...
...
files/file.c
View file @
ff07c204
...
...
@@ -174,30 +174,6 @@ void FILE_SetDosError(void)
}
static
HANDLE
FILE_OpenPipe
(
LPCWSTR
name
,
DWORD
access
,
LPSECURITY_ATTRIBUTES
sa
)
{
HANDLE
ret
;
DWORD
len
=
0
;
if
(
name
&&
(
len
=
strlenW
(
name
))
>
MAX_PATH
)
{
SetLastError
(
ERROR_FILENAME_EXCED_RANGE
);
return
0
;
}
SERVER_START_REQ
(
open_named_pipe
)
{
req
->
access
=
access
;
req
->
inherit
=
(
sa
&&
(
sa
->
nLength
>=
sizeof
(
*
sa
))
&&
sa
->
bInheritHandle
);
SetLastError
(
0
);
wine_server_add_data
(
req
,
name
,
len
*
sizeof
(
WCHAR
)
);
wine_server_call_err
(
req
);
ret
=
reply
->
handle
;
}
SERVER_END_REQ
;
TRACE
(
"Returned %p
\n
"
,
ret
);
return
ret
;
}
/*************************************************************************
* CreateFileW [KERNEL32.@] Creates or opens a file or other object
*
...
...
@@ -288,13 +264,9 @@ HANDLE WINAPI CreateFileW( LPCWSTR filename, DWORD access, DWORD sharing,
if
(
!
strncmpW
(
filename
,
bkslashes_with_dotW
,
4
))
{
static
const
WCHAR
pipeW
[]
=
{
'P'
,
'I'
,
'P'
,
'E'
,
'\\'
,
0
};
if
(
!
strncmpiW
(
filename
+
4
,
pipeW
,
5
))
{
TRACE
(
"Opening a pipe: %s
\n
"
,
debugstr_w
(
filename
));
ret
=
FILE_OpenPipe
(
filename
,
access
,
sa
);
goto
done
;
}
else
if
(
isalphaW
(
filename
[
4
])
&&
filename
[
5
]
==
':'
&&
filename
[
6
]
==
'\0'
)
if
((
isalphaW
(
filename
[
4
])
&&
filename
[
5
]
==
':'
&&
filename
[
6
]
==
'\0'
)
||
!
strncmpiW
(
filename
+
4
,
pipeW
,
5
))
{
dosdev
=
0
;
}
...
...
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