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
53dab152
Commit
53dab152
authored
Jan 27, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Jan 27, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Implement FindFirstChangeNotification with NtNotifyChangeDirectoryFile.
parent
385e693e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
31 deletions
+18
-31
change.c
dlls/kernel/change.c
+18
-31
No files found.
dlls/kernel/change.c
View file @
53dab152
...
...
@@ -58,14 +58,14 @@ HANDLE WINAPI FindFirstChangeNotificationW( LPCWSTR lpPathName, BOOL bWatchSubtr
OBJECT_ATTRIBUTES
attr
;
IO_STATUS_BLOCK
io
;
NTSTATUS
status
;
HANDLE
file
,
ret
=
INVALID_HANDLE_VALUE
;
HANDLE
handle
=
INVALID_HANDLE_VALUE
;
TRACE
(
"%s %d %lx
\n
"
,
debugstr_w
(
lpPathName
),
bWatchSubtree
,
dwNotifyFilter
);
if
(
!
RtlDosPathNameToNtPathName_U
(
lpPathName
,
&
nt_name
,
NULL
,
NULL
))
{
SetLastError
(
ERROR_PATH_NOT_FOUND
);
return
ret
;
return
handle
;
}
attr
.
Length
=
sizeof
(
attr
);
...
...
@@ -75,7 +75,7 @@ HANDLE WINAPI FindFirstChangeNotificationW( LPCWSTR lpPathName, BOOL bWatchSubtr
attr
.
SecurityDescriptor
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
status
=
NtOpenFile
(
&
fi
le
,
SYNCHRONIZE
,
&
attr
,
&
io
,
status
=
NtOpenFile
(
&
hand
le
,
SYNCHRONIZE
,
&
attr
,
&
io
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
|
FILE_SHARE_DELETE
,
FILE_DIRECTORY_FILE
|
FILE_SYNCHRONOUS_IO_NONALERT
);
RtlFreeUnicodeString
(
&
nt_name
);
...
...
@@ -83,21 +83,18 @@ HANDLE WINAPI FindFirstChangeNotificationW( LPCWSTR lpPathName, BOOL bWatchSubtr
if
(
status
!=
STATUS_SUCCESS
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
ret
;
return
INVALID_HANDLE_VALUE
;
}
SERVER_START_REQ
(
read_directory_changes
)
status
=
NtNotifyChangeDirectoryFile
(
handle
,
NULL
,
NULL
,
NULL
,
&
io
,
NULL
,
0
,
dwNotifyFilter
,
bWatchSubtree
);
if
(
status
!=
STATUS_PENDING
)
{
req
->
handle
=
file
;
req
->
event
=
NULL
;
req
->
filter
=
dwNotifyFilter
;
status
=
wine_server_call
(
req
);
if
(
status
==
STATUS_PENDING
)
ret
=
file
;
NtClose
(
handle
);
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
INVALID_HANDLE_VALUE
;
}
SERVER_END_REQ
;
return
ret
;
return
handle
;
}
/****************************************************************************
...
...
@@ -105,29 +102,19 @@ HANDLE WINAPI FindFirstChangeNotificationW( LPCWSTR lpPathName, BOOL bWatchSubtr
*/
BOOL
WINAPI
FindNextChangeNotification
(
HANDLE
handle
)
{
BOOL
ret
=
FALSE
;
IO_STATUS_BLOCK
io
;
NTSTATUS
status
;
TRACE
(
"%p
\n
"
,
handle
);
if
(
!
handle
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
ret
;
}
SERVER_START_REQ
(
read_directory_changes
)
status
=
NtNotifyChangeDirectoryFile
(
handle
,
NULL
,
NULL
,
NULL
,
&
io
,
NULL
,
0
,
FILE_NOTIFY_CHANGE_SIZE
,
0
);
if
(
status
!=
STATUS_PENDING
)
{
req
->
handle
=
handle
;
req
->
event
=
NULL
;
req
->
filter
=
FILE_NOTIFY_CHANGE_SIZE
;
/* valid but ignored */
status
=
wine_server_call
(
req
);
if
(
status
==
STATUS_PENDING
)
ret
=
TRUE
;
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
FALSE
;
}
SERVER_END_REQ
;
return
ret
;
return
TRUE
;
}
/****************************************************************************
...
...
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