Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
308f73c0
Commit
308f73c0
authored
Sep 28, 2007
by
Andrey Turkin
Committed by
Alexandre Julliard
Sep 28, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Pass completion value to ntdll layer.
parent
d1a81558
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
12 deletions
+26
-12
change.c
dlls/kernel32/change.c
+5
-1
file.c
dlls/kernel32/file.c
+15
-8
sync.c
dlls/kernel32/sync.c
+3
-1
vxd.c
dlls/kernel32/vxd.c
+3
-2
No files found.
dlls/kernel32/change.c
View file @
308f73c0
...
...
@@ -155,6 +155,7 @@ BOOL WINAPI ReadDirectoryChangesW( HANDLE handle, LPVOID buffer, DWORD len, BOOL
IO_STATUS_BLOCK
*
ios
;
NTSTATUS
status
;
BOOL
ret
=
TRUE
;
LPVOID
cvalue
=
NULL
;
TRACE
(
"%p %p %08x %d %08x %p %p %p
\n
"
,
handle
,
buffer
,
len
,
subtree
,
filter
,
returned
,
overlapped
,
completion
);
...
...
@@ -166,12 +167,15 @@ BOOL WINAPI ReadDirectoryChangesW( HANDLE handle, LPVOID buffer, DWORD len, BOOL
pov
=
&
ov
;
}
else
{
pov
=
overlapped
;
if
(
!
completion
&&
((
ULONG_PTR
)
overlapped
->
hEvent
&
1
)
==
0
)
cvalue
=
overlapped
;
}
ios
=
(
PIO_STATUS_BLOCK
)
pov
;
ios
->
u
.
Status
=
STATUS_PENDING
;
status
=
NtNotifyChangeDirectoryFile
(
handle
,
pov
->
hEvent
,
NULL
,
NULL
,
status
=
NtNotifyChangeDirectoryFile
(
handle
,
pov
->
hEvent
,
NULL
,
cvalue
,
ios
,
buffer
,
len
,
filter
,
subtree
);
if
(
status
==
STATUS_PENDING
)
{
...
...
dlls/kernel32/file.c
View file @
308f73c0
...
...
@@ -402,6 +402,7 @@ BOOL WINAPI ReadFile( HANDLE hFile, LPVOID buffer, DWORD bytesToRead,
PIO_STATUS_BLOCK
io_status
=
&
iosb
;
HANDLE
hEvent
=
0
;
NTSTATUS
status
;
LPVOID
cvalue
=
NULL
;
TRACE
(
"%p %p %d %p %p
\n
"
,
hFile
,
buffer
,
bytesToRead
,
bytesRead
,
overlapped
);
...
...
@@ -419,11 +420,12 @@ BOOL WINAPI ReadFile( HANDLE hFile, LPVOID buffer, DWORD bytesToRead,
poffset
=
&
offset
;
hEvent
=
overlapped
->
hEvent
;
io_status
=
(
PIO_STATUS_BLOCK
)
overlapped
;
if
(((
ULONG_PTR
)
hEvent
&
1
)
==
0
)
cvalue
=
overlapped
;
}
io_status
->
u
.
Status
=
STATUS_PENDING
;
io_status
->
Information
=
0
;
status
=
NtReadFile
(
hFile
,
hEvent
,
NULL
,
NULL
,
io_status
,
buffer
,
bytesToRead
,
poffset
,
NULL
);
status
=
NtReadFile
(
hFile
,
hEvent
,
NULL
,
cvalue
,
io_status
,
buffer
,
bytesToRead
,
poffset
,
NULL
);
if
(
status
==
STATUS_PENDING
&&
!
overlapped
)
{
...
...
@@ -488,6 +490,7 @@ BOOL WINAPI WriteFile( HANDLE hFile, LPCVOID buffer, DWORD bytesToWrite,
NTSTATUS
status
;
IO_STATUS_BLOCK
iosb
;
PIO_STATUS_BLOCK
piosb
=
&
iosb
;
LPVOID
cvalue
=
NULL
;
TRACE
(
"%p %p %d %p %p
\n
"
,
hFile
,
buffer
,
bytesToWrite
,
bytesWritten
,
overlapped
);
...
...
@@ -501,17 +504,18 @@ BOOL WINAPI WriteFile( HANDLE hFile, LPCVOID buffer, DWORD bytesToWrite,
poffset
=
&
offset
;
hEvent
=
overlapped
->
hEvent
;
piosb
=
(
PIO_STATUS_BLOCK
)
overlapped
;
if
(((
ULONG_PTR
)
hEvent
&
1
)
==
0
)
cvalue
=
overlapped
;
}
piosb
->
u
.
Status
=
STATUS_PENDING
;
piosb
->
Information
=
0
;
status
=
NtWriteFile
(
hFile
,
hEvent
,
NULL
,
NULL
,
piosb
,
status
=
NtWriteFile
(
hFile
,
hEvent
,
NULL
,
cvalue
,
piosb
,
buffer
,
bytesToWrite
,
poffset
,
NULL
);
/* FIXME: NtWriteFile does not always cause page faults, generate them now */
if
(
status
==
STATUS_INVALID_USER_BUFFER
&&
!
IsBadReadPtr
(
buffer
,
bytesToWrite
))
{
status
=
NtWriteFile
(
hFile
,
hEvent
,
NULL
,
NULL
,
piosb
,
status
=
NtWriteFile
(
hFile
,
hEvent
,
NULL
,
cvalue
,
piosb
,
buffer
,
bytesToWrite
,
poffset
,
NULL
);
if
(
status
!=
STATUS_INVALID_USER_BUFFER
)
FIXME
(
"Could not access memory (%p,%d) at first, now OK. Protected by DIBSection code?
\n
"
,
...
...
@@ -1052,9 +1056,9 @@ BOOL WINAPI LockFile( HANDLE hFile, DWORD offset_low, DWORD offset_high,
offset
.
u
.
LowPart
=
offset_low
;
offset
.
u
.
HighPart
=
offset_high
;
status
=
NtLockFile
(
hFile
,
0
,
NULL
,
NULL
,
status
=
NtLockFile
(
hFile
,
0
,
NULL
,
NULL
,
NULL
,
&
offset
,
&
count
,
NULL
,
TRUE
,
TRUE
);
if
(
status
!=
STATUS_SUCCESS
)
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
!
status
;
}
...
...
@@ -1077,6 +1081,7 @@ BOOL WINAPI LockFileEx( HANDLE hFile, DWORD flags, DWORD reserved,
{
NTSTATUS
status
;
LARGE_INTEGER
count
,
offset
;
LPVOID
cvalue
=
NULL
;
if
(
reserved
)
{
...
...
@@ -1093,11 +1098,13 @@ BOOL WINAPI LockFileEx( HANDLE hFile, DWORD flags, DWORD reserved,
offset
.
u
.
LowPart
=
overlapped
->
u
.
s
.
Offset
;
offset
.
u
.
HighPart
=
overlapped
->
u
.
s
.
OffsetHigh
;
status
=
NtLockFile
(
hFile
,
overlapped
->
hEvent
,
NULL
,
NULL
,
NULL
,
&
offset
,
&
count
,
NULL
,
if
(((
ULONG_PTR
)
overlapped
->
hEvent
&
1
)
==
0
)
cvalue
=
overlapped
;
status
=
NtLockFile
(
hFile
,
overlapped
->
hEvent
,
NULL
,
cvalue
,
NULL
,
&
offset
,
&
count
,
NULL
,
flags
&
LOCKFILE_FAIL_IMMEDIATELY
,
flags
&
LOCKFILE_EXCLUSIVE_LOCK
);
if
(
status
)
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
!
status
;
}
...
...
dlls/kernel32/sync.c
View file @
308f73c0
...
...
@@ -1328,6 +1328,7 @@ BOOL WINAPI ConnectNamedPipe(HANDLE hPipe, LPOVERLAPPED overlapped)
{
NTSTATUS
status
;
IO_STATUS_BLOCK
status_block
;
LPVOID
cvalue
=
NULL
;
TRACE
(
"(%p,%p)
\n
"
,
hPipe
,
overlapped
);
...
...
@@ -1335,9 +1336,10 @@ BOOL WINAPI ConnectNamedPipe(HANDLE hPipe, LPOVERLAPPED overlapped)
{
overlapped
->
Internal
=
STATUS_PENDING
;
overlapped
->
InternalHigh
=
0
;
if
(((
ULONG_PTR
)
overlapped
->
hEvent
&
1
)
==
0
)
cvalue
=
overlapped
;
}
status
=
NtFsControlFile
(
hPipe
,
overlapped
?
overlapped
->
hEvent
:
NULL
,
NULL
,
NULL
,
status
=
NtFsControlFile
(
hPipe
,
overlapped
?
overlapped
->
hEvent
:
NULL
,
NULL
,
cvalue
,
overlapped
?
(
IO_STATUS_BLOCK
*
)
overlapped
:
&
status_block
,
FSCTL_PIPE_LISTEN
,
NULL
,
0
,
NULL
,
0
);
...
...
dlls/kernel32/vxd.c
View file @
308f73c0
...
...
@@ -351,16 +351,17 @@ BOOL WINAPI DeviceIoControl(HANDLE hDevice, DWORD dwIoControlCode,
if
(
lpOverlapped
)
{
LPVOID
cvalue
=
((
ULONG_PTR
)
lpOverlapped
->
hEvent
&
1
)
?
NULL
:
lpOverlapped
;
lpOverlapped
->
Internal
=
STATUS_PENDING
;
lpOverlapped
->
InternalHigh
=
0
;
if
(
HIWORD
(
dwIoControlCode
)
==
FILE_DEVICE_FILE_SYSTEM
)
status
=
NtFsControlFile
(
hDevice
,
lpOverlapped
->
hEvent
,
NULL
,
NULL
,
(
PIO_STATUS_BLOCK
)
lpOverlapped
,
NULL
,
cvalue
,
(
PIO_STATUS_BLOCK
)
lpOverlapped
,
dwIoControlCode
,
lpvInBuffer
,
cbInBuffer
,
lpvOutBuffer
,
cbOutBuffer
);
else
status
=
NtDeviceIoControlFile
(
hDevice
,
lpOverlapped
->
hEvent
,
NULL
,
NULL
,
(
PIO_STATUS_BLOCK
)
lpOverlapped
,
NULL
,
cvalue
,
(
PIO_STATUS_BLOCK
)
lpOverlapped
,
dwIoControlCode
,
lpvInBuffer
,
cbInBuffer
,
lpvOutBuffer
,
cbOutBuffer
);
if
(
lpcbBytesReturned
)
*
lpcbBytesReturned
=
lpOverlapped
->
InternalHigh
;
...
...
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