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
4269423e
Commit
4269423e
authored
Nov 04, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 05, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Added NtOpenKeyEx implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
56c045c6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
7 deletions
+35
-7
ntdll.spec
dlls/ntdll/ntdll.spec
+2
-0
reg.c
dlls/ntdll/reg.c
+18
-7
reg.c
dlls/ntdll/tests/reg.c
+14
-0
winternl.h
include/winternl.h
+1
-0
No files found.
dlls/ntdll/ntdll.spec
View file @
4269423e
...
...
@@ -213,6 +213,7 @@
@ stdcall NtOpenIoCompletion(ptr long ptr)
@ stdcall NtOpenJobObject(ptr long ptr)
@ stdcall NtOpenKey(ptr long ptr)
@ stdcall NtOpenKeyEx(ptr long ptr long)
@ stdcall NtOpenKeyedEvent(ptr long ptr)
@ stdcall NtOpenMutant(ptr long ptr)
@ stub NtOpenObjectAuditAlarm
...
...
@@ -1128,6 +1129,7 @@
@ stdcall ZwOpenIoCompletion(ptr long ptr) NtOpenIoCompletion
@ stdcall ZwOpenJobObject(ptr long ptr) NtOpenJobObject
@ stdcall ZwOpenKey(ptr long ptr) NtOpenKey
@ stdcall ZwOpenKeyEx(ptr long ptr long) NtOpenKeyEx
@ stdcall ZwOpenKeyedEvent(ptr long ptr) NtOpenKeyedEvent
@ stdcall ZwOpenMutant(ptr long ptr) NtOpenMutant
@ stub ZwOpenObjectAuditAlarm
...
...
dlls/ntdll/reg.c
View file @
4269423e
...
...
@@ -106,14 +106,10 @@ NTSTATUS WINAPI RtlpNtCreateKey( PHANDLE retkey, ACCESS_MASK access, const OBJEC
}
/******************************************************************************
* NtOpenKey [NTDLL.@]
* ZwOpenKey [NTDLL.@]
*
* OUT HANDLE retkey (returns 0 when failure)
* IN ACCESS_MASK access
* IN POBJECT_ATTRIBUTES attr
* NtOpenKeyEx [NTDLL.@]
* ZwOpenKeyEx [NTDLL.@]
*/
NTSTATUS
WINAPI
NtOpenKey
(
PHANDLE
retkey
,
ACCESS_MASK
access
,
const
OBJECT_ATTRIBUTES
*
attr
)
NTSTATUS
WINAPI
NtOpenKey
Ex
(
PHANDLE
retkey
,
ACCESS_MASK
access
,
const
OBJECT_ATTRIBUTES
*
attr
,
ULONG
options
)
{
NTSTATUS
ret
;
DWORD
len
;
...
...
@@ -123,6 +119,8 @@ NTSTATUS WINAPI NtOpenKey( PHANDLE retkey, ACCESS_MASK access, const OBJECT_ATTR
len
=
attr
->
ObjectName
->
Length
;
TRACE
(
"(%p,%s,%x,%p)
\n
"
,
attr
->
RootDirectory
,
debugstr_us
(
attr
->
ObjectName
),
access
,
retkey
);
if
(
options
)
FIXME
(
"options %x not implemented
\n
"
,
options
);
if
(
len
>
MAX_NAME_LENGTH
)
return
STATUS_BUFFER_OVERFLOW
;
...
...
@@ -141,6 +139,19 @@ NTSTATUS WINAPI NtOpenKey( PHANDLE retkey, ACCESS_MASK access, const OBJECT_ATTR
}
/******************************************************************************
* NtOpenKey [NTDLL.@]
* ZwOpenKey [NTDLL.@]
*
* OUT HANDLE retkey (returns 0 when failure)
* IN ACCESS_MASK access
* IN POBJECT_ATTRIBUTES attr
*/
NTSTATUS
WINAPI
NtOpenKey
(
PHANDLE
retkey
,
ACCESS_MASK
access
,
const
OBJECT_ATTRIBUTES
*
attr
)
{
return
NtOpenKeyEx
(
retkey
,
access
,
attr
,
0
);
}
/******************************************************************************
* RtlpNtOpenKey [NTDLL.@]
*
* See NtOpenKey.
...
...
dlls/ntdll/tests/reg.c
View file @
4269423e
...
...
@@ -123,6 +123,7 @@ static NTSTATUS (WINAPI * pRtlQueryRegistryValues)(IN ULONG, IN PCWSTR,IN PRTL_Q
static
NTSTATUS
(
WINAPI
*
pRtlCheckRegistryKey
)(
IN
ULONG
,
IN
PWSTR
);
static
NTSTATUS
(
WINAPI
*
pRtlOpenCurrentUser
)(
IN
ACCESS_MASK
,
PHANDLE
);
static
NTSTATUS
(
WINAPI
*
pNtOpenKey
)(
PHANDLE
,
IN
ACCESS_MASK
,
IN
POBJECT_ATTRIBUTES
);
static
NTSTATUS
(
WINAPI
*
pNtOpenKeyEx
)(
PHANDLE
,
ACCESS_MASK
,
POBJECT_ATTRIBUTES
,
ULONG
);
static
NTSTATUS
(
WINAPI
*
pNtClose
)(
IN
HANDLE
);
static
NTSTATUS
(
WINAPI
*
pNtFlushKey
)(
HANDLE
);
static
NTSTATUS
(
WINAPI
*
pNtDeleteKey
)(
HANDLE
);
...
...
@@ -195,6 +196,7 @@ static BOOL InitFunctionPtrs(void)
/* optional functions */
pNtQueryLicenseValue
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtQueryLicenseValue"
);
pNtOpenKeyEx
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtOpenKeyEx"
);
return
TRUE
;
}
...
...
@@ -351,6 +353,18 @@ static void test_NtOpenKey(void)
attr
.
Length
*=
2
;
status
=
pNtOpenKey
(
&
key
,
am
,
&
attr
);
ok
(
status
==
STATUS_INVALID_PARAMETER
,
"Expected STATUS_INVALID_PARAMETER, got: 0x%08x
\n
"
,
status
);
if
(
!
pNtOpenKeyEx
)
{
win_skip
(
"NtOpenKeyEx not available
\n
"
);
return
;
}
InitializeObjectAttributes
(
&
attr
,
&
winetestpath
,
0
,
0
,
0
);
status
=
pNtOpenKeyEx
(
&
key
,
KEY_WRITE
|
KEY_READ
,
&
attr
,
0
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKeyEx Failed: 0x%08x
\n
"
,
status
);
pNtClose
(
key
);
}
static
void
test_NtCreateKey
(
void
)
...
...
include/winternl.h
View file @
4269423e
...
...
@@ -2169,6 +2169,7 @@ NTSYSAPI NTSTATUS WINAPI NtOpenFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_
NTSYSAPI
NTSTATUS
WINAPI
NtOpenIoCompletion
(
PHANDLE
,
ACCESS_MASK
,
POBJECT_ATTRIBUTES
);
NTSYSAPI
NTSTATUS
WINAPI
NtOpenJobObject
(
PHANDLE
,
ACCESS_MASK
,
const
OBJECT_ATTRIBUTES
*
);
NTSYSAPI
NTSTATUS
WINAPI
NtOpenKey
(
PHANDLE
,
ACCESS_MASK
,
const
OBJECT_ATTRIBUTES
*
);
NTSYSAPI
NTSTATUS
WINAPI
NtOpenKeyEx
(
PHANDLE
,
ACCESS_MASK
,
const
OBJECT_ATTRIBUTES
*
,
ULONG
);
NTSYSAPI
NTSTATUS
WINAPI
NtOpenKeyedEvent
(
HANDLE
*
,
ACCESS_MASK
,
const
OBJECT_ATTRIBUTES
*
);
NTSYSAPI
NTSTATUS
WINAPI
NtOpenMutant
(
PHANDLE
,
ACCESS_MASK
,
const
OBJECT_ATTRIBUTES
*
);
NTSYSAPI
NTSTATUS
WINAPI
NtOpenObjectAuditAlarm
(
PUNICODE_STRING
,
PHANDLE
,
PUNICODE_STRING
,
PUNICODE_STRING
,
PSECURITY_DESCRIPTOR
,
HANDLE
,
ACCESS_MASK
,
ACCESS_MASK
,
PPRIVILEGE_SET
,
BOOLEAN
,
BOOLEAN
,
PBOOLEAN
);
...
...
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