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
016206c1
Commit
016206c1
authored
Apr 11, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Apr 11, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move mailslot set and query info implementation to ntdll.
parent
861282bf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
30 deletions
+80
-30
sync.c
dlls/kernel/sync.c
+31
-29
file.c
dlls/ntdll/file.c
+37
-1
winternl.h
include/winternl.h
+12
-0
No files found.
dlls/kernel/sync.c
View file @
016206c1
...
...
@@ -1641,31 +1641,32 @@ BOOL WINAPI GetMailslotInfo( HANDLE hMailslot, LPDWORD lpMaxMessageSize,
LPDWORD
lpNextSize
,
LPDWORD
lpMessageCount
,
LPDWORD
lpReadTimeout
)
{
BOOL
r
;
FILE_MAILSLOT_QUERY_INFORMATION
info
;
IO_STATUS_BLOCK
iosb
;
NTSTATUS
status
;
TRACE
(
"%p %p %p %p %p
\n
"
,
hMailslot
,
lp
MaxMessageSize
,
lpNextSize
,
lpMessageCount
,
lpReadTimeout
);
TRACE
(
"%p %p %p %p %p
\n
"
,
hMailslot
,
lpMaxMessageSize
,
lp
NextSize
,
lpMessageCount
,
lpReadTimeout
);
SERVER_START_REQ
(
set_mailslot_info
)
status
=
NtQueryInformationFile
(
hMailslot
,
&
iosb
,
&
info
,
sizeof
info
,
FileMailslotQueryInformation
);
if
(
status
!=
STATUS_SUCCESS
)
{
req
->
handle
=
hMailslot
;
req
->
flags
=
0
;
r
=
!
wine_server_call_err
(
req
);
if
(
r
)
{
if
(
lpMaxMessageSize
)
*
lpMaxMessageSize
=
reply
->
max_msgsize
;
if
(
lpNextSize
)
*
lpNextSize
=
reply
->
next_msgsize
;
if
(
lpMessageCount
)
*
lpMessageCount
=
reply
->
msg_count
;
if
(
lpReadTimeout
)
*
lpReadTimeout
=
reply
->
read_timeout
;
}
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
FALSE
;
}
SERVER_END_REQ
;
return
r
;
if
(
lpMaxMessageSize
)
*
lpMaxMessageSize
=
info
.
MaximumMessageSize
;
if
(
lpNextSize
)
*
lpNextSize
=
info
.
NextMessageSize
;
if
(
lpMessageCount
)
*
lpMessageCount
=
info
.
MessagesAvailable
;
if
(
lpReadTimeout
)
*
lpReadTimeout
=
info
.
ReadTimeout
.
QuadPart
/
-
10000
;
return
TRUE
;
}
...
...
@@ -1684,20 +1685,21 @@ BOOL WINAPI GetMailslotInfo( HANDLE hMailslot, LPDWORD lpMaxMessageSize,
*/
BOOL
WINAPI
SetMailslotInfo
(
HANDLE
hMailslot
,
DWORD
dwReadTimeout
)
{
BOOL
r
;
FILE_MAILSLOT_SET_INFORMATION
info
;
IO_STATUS_BLOCK
iosb
;
NTSTATUS
status
;
TRACE
(
"%p %ld
\n
"
,
hMailslot
,
dwReadTimeout
);
SERVER_START_REQ
(
set_mailslot_info
)
info
.
ReadTimeout
.
QuadPart
=
dwReadTimeout
*
-
10000
;
status
=
NtSetInformationFile
(
hMailslot
,
&
iosb
,
&
info
,
sizeof
info
,
FileMailslotSetInformation
);
if
(
status
!=
STATUS_SUCCESS
)
{
req
->
handle
=
hMailslot
;
req
->
flags
=
MAILSLOT_SET_READ_TIMEOUT
;
req
->
read_timeout
=
dwReadTimeout
;
r
=
!
wine_server_call_err
(
req
);
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
FALSE
;
}
SERVER_END_REQ
;
return
r
;
return
TRUE
;
}
...
...
dlls/ntdll/file.c
View file @
016206c1
...
...
@@ -941,7 +941,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
0
,
/* FilePipeInformation */
0
,
/* FilePipeLocalInformation */
0
,
/* FilePipeRemoteInformation */
0
,
/* FileMailslotQueryInformation */
sizeof
(
FILE_MAILSLOT_QUERY_INFORMATION
),
/* FileMailslotQueryInformation */
0
,
/* FileMailslotSetInformation */
0
,
/* FileCompressionInformation */
0
,
/* FileObjectIdInformation */
...
...
@@ -1093,6 +1093,27 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
}
}
break
;
case
FileMailslotQueryInformation
:
{
FILE_MAILSLOT_QUERY_INFORMATION
*
info
=
ptr
;
SERVER_START_REQ
(
set_mailslot_info
)
{
req
->
handle
=
hFile
;
req
->
flags
=
0
;
io
->
u
.
Status
=
wine_server_call
(
req
);
if
(
io
->
u
.
Status
==
STATUS_SUCCESS
)
{
info
->
MaximumMessageSize
=
reply
->
max_msgsize
;
info
->
MailslotQuota
=
0
;
info
->
NextMessageSize
=
reply
->
next_msgsize
;
info
->
MessagesAvailable
=
reply
->
msg_count
;
info
->
ReadTimeout
.
QuadPart
=
reply
->
read_timeout
*
-
10000
;
}
}
SERVER_END_REQ
;
}
break
;
default:
FIXME
(
"Unsupported class (%d)
\n
"
,
class
);
io
->
u
.
Status
=
STATUS_NOT_IMPLEMENTED
;
...
...
@@ -1229,6 +1250,21 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io,
else
io
->
u
.
Status
=
STATUS_INVALID_PARAMETER_3
;
break
;
case
FileMailslotSetInformation
:
{
FILE_MAILSLOT_SET_INFORMATION
*
info
=
ptr
;
SERVER_START_REQ
(
set_mailslot_info
)
{
req
->
handle
=
handle
;
req
->
flags
=
MAILSLOT_SET_READ_TIMEOUT
;
req
->
read_timeout
=
info
->
ReadTimeout
.
QuadPart
/
-
10000
;
io
->
u
.
Status
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
}
break
;
default:
FIXME
(
"Unsupported class (%d)
\n
"
,
class
);
io
->
u
.
Status
=
STATUS_NOT_IMPLEMENTED
;
...
...
include/winternl.h
View file @
016206c1
...
...
@@ -436,6 +436,18 @@ typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION
ULONG
ReparseTag
;
}
FILE_ATTRIBUTE_TAG_INFORMATION
,
*
PFILE_ATTRIBUTE_TAG_INFORMATION
;
typedef
struct
_FILE_MAILSLOT_QUERY_INFORMATION
{
ULONG
MaximumMessageSize
;
ULONG
MailslotQuota
;
ULONG
NextMessageSize
;
ULONG
MessagesAvailable
;
LARGE_INTEGER
ReadTimeout
;
}
FILE_MAILSLOT_QUERY_INFORMATION
,
*
PFILE_MAILSLOT_QUERY_INFORMATION
;
typedef
struct
_FILE_MAILSLOT_SET_INFORMATION
{
LARGE_INTEGER
ReadTimeout
;
}
FILE_MAILSLOT_SET_INFORMATION
,
*
PFILE_MAILSLOT_SET_INFORMATION
;
typedef
struct
_FILE_ALL_INFORMATION
{
FILE_BASIC_INFORMATION
BasicInformation
;
...
...
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