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
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
27 deletions
+77
-27
sync.c
dlls/kernel/sync.c
+28
-26
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,
...
@@ -1641,31 +1641,32 @@ BOOL WINAPI GetMailslotInfo( HANDLE hMailslot, LPDWORD lpMaxMessageSize,
LPDWORD
lpNextSize
,
LPDWORD
lpMessageCount
,
LPDWORD
lpNextSize
,
LPDWORD
lpMessageCount
,
LPDWORD
lpReadTimeout
)
LPDWORD
lpReadTimeout
)
{
{
BOOL
r
;
FILE_MAILSLOT_QUERY_INFORMATION
info
;
IO_STATUS_BLOCK
iosb
;
NTSTATUS
status
;
TRACE
(
"%p %p %p %p %p
\n
"
,
hMailslot
,
TRACE
(
"%p %p %p %p %p
\n
"
,
hMailslot
,
lpMaxMessageSize
,
lp
MaxMessageSize
,
lpNextSize
,
lpMessageCount
,
lpReadTimeout
);
lp
NextSize
,
lpMessageCount
,
lpReadTimeout
);
SERVER_START_REQ
(
set_mailslot_info
)
status
=
NtQueryInformationFile
(
hMailslot
,
&
iosb
,
&
info
,
sizeof
info
,
{
FileMailslotQueryInformation
);
req
->
handle
=
hMailslot
;
req
->
flags
=
0
;
if
(
status
!=
STATUS_SUCCESS
)
r
=
!
wine_server_call_err
(
req
);
if
(
r
)
{
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
FALSE
;
}
if
(
lpMaxMessageSize
)
if
(
lpMaxMessageSize
)
*
lpMaxMessageSize
=
reply
->
max_msgs
ize
;
*
lpMaxMessageSize
=
info
.
MaximumMessageS
ize
;
if
(
lpNextSize
)
if
(
lpNextSize
)
*
lpNextSize
=
reply
->
next_msgs
ize
;
*
lpNextSize
=
info
.
NextMessageS
ize
;
if
(
lpMessageCount
)
if
(
lpMessageCount
)
*
lpMessageCount
=
reply
->
msg_count
;
*
lpMessageCount
=
info
.
MessagesAvailable
;
if
(
lpReadTimeout
)
if
(
lpReadTimeout
)
*
lpReadTimeout
=
reply
->
read_timeout
;
*
lpReadTimeout
=
info
.
ReadTimeout
.
QuadPart
/
-
10000
;
}
}
SERVER_END_REQ
;
return
r
;
return
TRUE
;
}
}
...
@@ -1684,20 +1685,21 @@ BOOL WINAPI GetMailslotInfo( HANDLE hMailslot, LPDWORD lpMaxMessageSize,
...
@@ -1684,20 +1685,21 @@ BOOL WINAPI GetMailslotInfo( HANDLE hMailslot, LPDWORD lpMaxMessageSize,
*/
*/
BOOL
WINAPI
SetMailslotInfo
(
HANDLE
hMailslot
,
DWORD
dwReadTimeout
)
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
);
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
;
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
req
->
flags
=
MAILSLOT_SET_READ_TIMEOUT
;
return
FALSE
;
req
->
read_timeout
=
dwReadTimeout
;
r
=
!
wine_server_call_err
(
req
);
}
}
SERVER_END_REQ
;
return
TRUE
;
return
r
;
}
}
...
...
dlls/ntdll/file.c
View file @
016206c1
...
@@ -941,7 +941,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
...
@@ -941,7 +941,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
0
,
/* FilePipeInformation */
0
,
/* FilePipeInformation */
0
,
/* FilePipeLocalInformation */
0
,
/* FilePipeLocalInformation */
0
,
/* FilePipeRemoteInformation */
0
,
/* FilePipeRemoteInformation */
0
,
/* FileMailslotQueryInformation */
sizeof
(
FILE_MAILSLOT_QUERY_INFORMATION
),
/* FileMailslotQueryInformation */
0
,
/* FileMailslotSetInformation */
0
,
/* FileMailslotSetInformation */
0
,
/* FileCompressionInformation */
0
,
/* FileCompressionInformation */
0
,
/* FileObjectIdInformation */
0
,
/* FileObjectIdInformation */
...
@@ -1093,6 +1093,27 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
...
@@ -1093,6 +1093,27 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
}
}
}
}
break
;
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:
default:
FIXME
(
"Unsupported class (%d)
\n
"
,
class
);
FIXME
(
"Unsupported class (%d)
\n
"
,
class
);
io
->
u
.
Status
=
STATUS_NOT_IMPLEMENTED
;
io
->
u
.
Status
=
STATUS_NOT_IMPLEMENTED
;
...
@@ -1229,6 +1250,21 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io,
...
@@ -1229,6 +1250,21 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io,
else
io
->
u
.
Status
=
STATUS_INVALID_PARAMETER_3
;
else
io
->
u
.
Status
=
STATUS_INVALID_PARAMETER_3
;
break
;
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:
default:
FIXME
(
"Unsupported class (%d)
\n
"
,
class
);
FIXME
(
"Unsupported class (%d)
\n
"
,
class
);
io
->
u
.
Status
=
STATUS_NOT_IMPLEMENTED
;
io
->
u
.
Status
=
STATUS_NOT_IMPLEMENTED
;
...
...
include/winternl.h
View file @
016206c1
...
@@ -436,6 +436,18 @@ typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION
...
@@ -436,6 +436,18 @@ typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION
ULONG
ReparseTag
;
ULONG
ReparseTag
;
}
FILE_ATTRIBUTE_TAG_INFORMATION
,
*
PFILE_ATTRIBUTE_TAG_INFORMATION
;
}
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
typedef
struct
_FILE_ALL_INFORMATION
{
{
FILE_BASIC_INFORMATION
BasicInformation
;
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