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
efbea2e2
Commit
efbea2e2
authored
May 16, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
May 16, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement RegNotifyChangeKeyValue on top of NtNotifyChangeKey.
parent
bac5f460
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
26 deletions
+49
-26
registry.c
dlls/advapi32/registry.c
+14
-23
reg.c
dlls/ntdll/reg.c
+35
-3
No files found.
dlls/advapi32/registry.c
View file @
efbea2e2
...
@@ -35,10 +35,10 @@
...
@@ -35,10 +35,10 @@
#include "winreg.h"
#include "winreg.h"
#include "winerror.h"
#include "winerror.h"
#include "ntstatus.h"
#include "ntstatus.h"
#include "winternl.h"
#include "wine/unicode.h"
#include "wine/unicode.h"
#include "wine/server.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "winternl.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
reg
);
WINE_DEFAULT_DEBUG_CHANNEL
(
reg
);
...
@@ -2032,32 +2032,23 @@ LONG WINAPI RegNotifyChangeKeyValue( HKEY hkey, BOOL fWatchSubTree,
...
@@ -2032,32 +2032,23 @@ LONG WINAPI RegNotifyChangeKeyValue( HKEY hkey, BOOL fWatchSubTree,
DWORD
fdwNotifyFilter
,
HANDLE
hEvent
,
DWORD
fdwNotifyFilter
,
HANDLE
hEvent
,
BOOL
fAsync
)
BOOL
fAsync
)
{
{
LONG
ret
;
NTSTATUS
status
;
IO_STATUS_BLOCK
iosb
;
TRACE
(
"(%p,%i,%ld,%p,%i)
\n
"
,
hkey
,
fWatchSubTree
,
fdwNotifyFilter
,
hkey
=
get_special_root_hkey
(
hkey
);
hEvent
,
fAsync
)
;
if
(
!
hkey
)
return
ERROR_INVALID_HANDLE
;
if
(
!
fAsync
)
TRACE
(
"(%p,%i,%ld,%p,%i)
\n
"
,
hkey
,
fWatchSubTree
,
fdwNotifyFilter
,
hEvent
=
CreateEventW
(
NULL
,
0
,
0
,
NULL
);
hEvent
,
fAsync
);
SERVER_START_REQ
(
set_registry_notification
)
status
=
NtNotifyChangeKey
(
hkey
,
hEvent
,
NULL
,
NULL
,
&
iosb
,
{
fdwNotifyFilter
,
fWatchSubTree
,
NULL
,
0
,
req
->
hkey
=
hkey
;
fAsync
);
req
->
event
=
hEvent
;
req
->
subtree
=
fWatchSubTree
;
req
->
filter
=
fdwNotifyFilter
;
ret
=
RtlNtStatusToDosError
(
wine_server_call
(
req
)
);
}
SERVER_END_REQ
;
if
(
!
fAsync
)
if
(
status
&&
status
!=
STATUS_TIMEOUT
)
{
return
RtlNtStatusToDosError
(
status
);
if
(
ret
==
ERROR_SUCCESS
)
WaitForSingleObject
(
hEvent
,
INFINITE
);
CloseHandle
(
hEvent
);
}
return
ret
;
return
ERROR_SUCCESS
;
}
}
/******************************************************************************
/******************************************************************************
...
...
dlls/ntdll/reg.c
View file @
efbea2e2
...
@@ -595,14 +595,46 @@ NTSTATUS WINAPI NtNotifyChangeKey(
...
@@ -595,14 +595,46 @@ NTSTATUS WINAPI NtNotifyChangeKey(
IN
PVOID
ApcContext
OPTIONAL
,
IN
PVOID
ApcContext
OPTIONAL
,
OUT
PIO_STATUS_BLOCK
IoStatusBlock
,
OUT
PIO_STATUS_BLOCK
IoStatusBlock
,
IN
ULONG
CompletionFilter
,
IN
ULONG
CompletionFilter
,
IN
BOOLEAN
Asynchron
e
ous
,
IN
BOOLEAN
Asynchronous
,
OUT
PVOID
ChangeBuffer
,
OUT
PVOID
ChangeBuffer
,
IN
ULONG
Length
,
IN
ULONG
Length
,
IN
BOOLEAN
WatchSubtree
)
IN
BOOLEAN
WatchSubtree
)
{
{
FIXME
(
"(%p,%p,%p,%p,%p,0x%08lx, 0x%08x,%p,0x%08lx,0x%08x) stub!
\n
"
,
NTSTATUS
ret
;
TRACE
(
"(%p,%p,%p,%p,%p,0x%08lx, 0x%08x,%p,0x%08lx,0x%08x)
\n
"
,
KeyHandle
,
Event
,
ApcRoutine
,
ApcContext
,
IoStatusBlock
,
CompletionFilter
,
KeyHandle
,
Event
,
ApcRoutine
,
ApcContext
,
IoStatusBlock
,
CompletionFilter
,
Asynchroneous
,
ChangeBuffer
,
Length
,
WatchSubtree
);
Asynchronous
,
ChangeBuffer
,
Length
,
WatchSubtree
);
if
(
ApcRoutine
||
ApcContext
||
ChangeBuffer
||
Length
)
FIXME
(
"Unimplemented optional parameter
\n
"
);
if
(
!
Asynchronous
)
{
OBJECT_ATTRIBUTES
attr
;
InitializeObjectAttributes
(
&
attr
,
NULL
,
0
,
NULL
,
NULL
);
ret
=
NtCreateEvent
(
&
Event
,
EVENT_ALL_ACCESS
,
&
attr
,
FALSE
,
FALSE
);
if
(
ret
!=
STATUS_SUCCESS
)
return
ret
;
}
SERVER_START_REQ
(
set_registry_notification
)
{
req
->
hkey
=
KeyHandle
;
req
->
event
=
Event
;
req
->
subtree
=
WatchSubtree
;
req
->
filter
=
CompletionFilter
;
ret
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
if
(
!
Asynchronous
)
{
if
(
ret
==
STATUS_SUCCESS
)
NtWaitForSingleObject
(
Event
,
FALSE
,
NULL
);
NtClose
(
Event
);
}
return
STATUS_SUCCESS
;
return
STATUS_SUCCESS
;
}
}
...
...
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