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
03ce33f6
Commit
03ce33f6
authored
Dec 04, 2003
by
Jon Griffiths
Committed by
Alexandre Julliard
Dec 04, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement the Rtlp* registry functions.
parent
f752be84
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
137 additions
and
8 deletions
+137
-8
ntdll.spec
dlls/ntdll/ntdll.spec
+8
-8
reg.c
dlls/ntdll/reg.c
+129
-0
No files found.
dlls/ntdll/ntdll.spec
View file @
03ce33f6
...
...
@@ -80,7 +80,7 @@
@ stub NtCreateEventPair
@ stdcall NtCreateFile(ptr long ptr ptr long long long ptr long long ptr)
@ stub NtCreateIoCompletion
@ stdcall NtCreateKey(
long long long long long
long long)
@ stdcall NtCreateKey(
ptr long ptr long ptr
long long)
@ stdcall NtCreateMailslotFile(long long long long long long long long)
@ stub NtCreateMutant
@ stub NtCreateNamedPipeFile
...
...
@@ -579,12 +579,12 @@
@ stub RtlZeroHeap
@ stdcall RtlZeroMemory(ptr long)
@ stub RtlpInitializeRtl
@ st
ub RtlpNtCreateKey
@ st
ub RtlpNtEnumerateSubKey
@ st
ub RtlpNtMakeTemporaryKey
@ st
ub RtlpNtOpenKey
@ st
ub RtlpNtQueryValueKey
@ st
ub RtlpNtSetValueKey
@ st
dcall RtlpNtCreateKey(ptr long ptr long ptr long long)
@ st
dcall RtlpNtEnumerateSubKey(ptr ptr long)
@ st
dcall RtlpNtMakeTemporaryKey(ptr)
@ st
dcall RtlpNtOpenKey(ptr long ptr)
@ st
dcall RtlpNtQueryValueKey(long ptr ptr ptr)
@ st
dcall RtlpNtSetValueKey(ptr long ptr long)
@ stdcall RtlpUnWaitCriticalSection(ptr)
@ stdcall RtlpWaitForCriticalSection(ptr)
@ stdcall RtlxAnsiStringToUnicodeSize(ptr) RtlAnsiStringToUnicodeSize
...
...
@@ -616,7 +616,7 @@
@ stub ZwCreateEventPair
@ stdcall ZwCreateFile(ptr long ptr ptr long long long ptr long long ptr) NtCreateFile
@ stub ZwCreateIoCompletion
@ stdcall ZwCreateKey(
long long long long long
long long) NtCreateKey
@ stdcall ZwCreateKey(
ptr long ptr long ptr
long long) NtCreateKey
@ stdcall ZwCreateMailslotFile(long long long long long long long long) NtCreateMailslotFile
@ stub ZwCreateMutant
@ stub ZwCreateNamedPipeFile
...
...
dlls/ntdll/reg.c
View file @
03ce33f6
...
...
@@ -85,6 +85,20 @@ NTSTATUS WINAPI NtCreateKey( PHKEY retkey, ACCESS_MASK access, const OBJECT_ATTR
return
ret
;
}
/******************************************************************************
* RtlpNtCreateKey [NTDLL.@]
*
* See NtCreateKey.
*/
NTSTATUS
WINAPI
RtlpNtCreateKey
(
PHKEY
retkey
,
ACCESS_MASK
access
,
OBJECT_ATTRIBUTES
*
attr
,
ULONG
TitleIndex
,
const
UNICODE_STRING
*
class
,
ULONG
options
,
PULONG
dispos
)
{
if
(
attr
)
attr
->
Attributes
&=
~
(
OBJ_PERMANENT
|
OBJ_EXCLUSIVE
);
return
NtCreateKey
(
retkey
,
access
,
attr
,
0
,
NULL
,
0
,
dispos
);
}
/******************************************************************************
* NtOpenKey [NTDLL.@]
...
...
@@ -118,6 +132,17 @@ NTSTATUS WINAPI NtOpenKey( PHKEY retkey, ACCESS_MASK access, const OBJECT_ATTRIB
return
ret
;
}
/******************************************************************************
* RtlpNtOpenKey [NTDLL.@]
*
* See NtOpenKey.
*/
NTSTATUS
WINAPI
RtlpNtOpenKey
(
PHKEY
retkey
,
ACCESS_MASK
access
,
OBJECT_ATTRIBUTES
*
attr
)
{
if
(
attr
)
attr
->
Attributes
&=
~
(
OBJ_PERMANENT
|
OBJ_EXCLUSIVE
);
return
NtOpenKey
(
retkey
,
access
,
attr
);
}
/******************************************************************************
* NtDeleteKey [NTDLL.@]
...
...
@@ -138,6 +163,15 @@ NTSTATUS WINAPI NtDeleteKey( HKEY hkey )
return
ret
;
}
/******************************************************************************
* RtlpNtMakeTemporaryKey [NTDLL.@]
*
* See NtDeleteKey.
*/
NTSTATUS
WINAPI
RtlpNtMakeTemporaryKey
(
HKEY
hkey
)
{
return
NtDeleteKey
(
hkey
);
}
/******************************************************************************
* NtDeleteValueKey [NTDLL.@]
...
...
@@ -266,6 +300,53 @@ NTSTATUS WINAPI NtEnumerateKey( HKEY handle, ULONG index, KEY_INFORMATION_CLASS
/******************************************************************************
* RtlpNtEnumerateSubKey [NTDLL.@]
*
*/
NTSTATUS
WINAPI
RtlpNtEnumerateSubKey
(
HKEY
handle
,
UNICODE_STRING
*
out
,
ULONG
index
)
{
KEY_BASIC_INFORMATION
*
info
;
DWORD
dwLen
,
dwResultLen
;
NTSTATUS
ret
;
if
(
out
->
Length
)
{
dwLen
=
out
->
Length
+
sizeof
(
KEY_BASIC_INFORMATION
);
info
=
(
KEY_BASIC_INFORMATION
*
)
RtlAllocateHeap
(
ntdll_get_process_heap
(),
0
,
dwLen
);
if
(
!
info
)
return
STATUS_NO_MEMORY
;
}
else
{
dwLen
=
0
;
info
=
NULL
;
}
ret
=
NtEnumerateKey
(
handle
,
index
,
KeyBasicInformation
,
info
,
dwLen
,
&
dwResultLen
);
dwResultLen
-=
sizeof
(
KEY_BASIC_INFORMATION
);
if
(
ret
==
STATUS_BUFFER_OVERFLOW
)
out
->
Length
=
dwResultLen
;
else
if
(
!
ret
)
{
if
(
out
->
Length
<
info
->
NameLength
)
{
out
->
Length
=
dwResultLen
;
ret
=
STATUS_BUFFER_OVERFLOW
;
}
else
{
out
->
Length
=
info
->
NameLength
;
memcpy
(
out
->
Buffer
,
info
->
Name
,
info
->
NameLength
);
}
}
if
(
info
)
RtlFreeHeap
(
ntdll_get_process_heap
(),
0
,
info
);
return
ret
;
}
/******************************************************************************
* NtQueryKey [NTDLL.@]
* ZwQueryKey [NTDLL.@]
*/
...
...
@@ -421,6 +502,41 @@ NTSTATUS WINAPI NtQueryValueKey( HKEY handle, const UNICODE_STRING *name,
return
ret
;
}
/******************************************************************************
* RtlpNtQueryValueKey [NTDLL.@]
*
*/
NTSTATUS
WINAPI
RtlpNtQueryValueKey
(
HKEY
handle
,
ULONG
*
result_type
,
PBYTE
dest
,
DWORD
*
result_len
)
{
KEY_VALUE_PARTIAL_INFORMATION
*
info
;
UNICODE_STRING
name
;
NTSTATUS
ret
;
DWORD
dwResultLen
;
DWORD
dwLen
=
sizeof
(
KEY_VALUE_PARTIAL_INFORMATION
)
+
result_len
?
*
result_len
:
0
;
info
=
(
KEY_VALUE_PARTIAL_INFORMATION
*
)
RtlAllocateHeap
(
ntdll_get_process_heap
(),
0
,
dwLen
);
if
(
!
info
)
return
STATUS_NO_MEMORY
;
name
.
Length
=
0
;
ret
=
NtQueryValueKey
(
handle
,
&
name
,
KeyValuePartialInformation
,
info
,
dwLen
,
&
dwResultLen
);
if
(
!
ret
||
ret
==
STATUS_BUFFER_OVERFLOW
)
{
if
(
result_len
)
*
result_len
=
info
->
DataLength
;
if
(
result_type
)
*
result_type
=
info
->
Type
;
if
(
ret
!=
STATUS_BUFFER_OVERFLOW
)
memcpy
(
dest
,
info
->
Data
,
info
->
DataLength
);
}
RtlFreeHeap
(
ntdll_get_process_heap
(),
0
,
info
);
return
ret
;
}
/******************************************************************************
* NtFlushKey [NTDLL.@]
...
...
@@ -572,6 +688,19 @@ NTSTATUS WINAPI NtSetValueKey( HKEY hkey, const UNICODE_STRING *name, ULONG Titl
}
/******************************************************************************
* RtlpNtSetValueKey [NTDLL.@]
*
*/
NTSTATUS
WINAPI
RtlpNtSetValueKey
(
HKEY
hkey
,
ULONG
type
,
const
void
*
data
,
ULONG
count
)
{
UNICODE_STRING
name
;
name
.
Length
=
0
;
return
NtSetValueKey
(
hkey
,
&
name
,
0
,
type
,
data
,
count
);
}
/******************************************************************************
* NtUnloadKey [NTDLL.@]
* ZwUnloadKey [NTDLL.@]
*/
...
...
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