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
9e509718
Commit
9e509718
authored
Jul 20, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement RtlHashUnicodeString().
parent
dd649520
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
3 deletions
+32
-3
ntdll.spec
dlls/ntdll/ntdll.spec
+1
-1
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+4
-0
rtlstr.c
dlls/ntdll/rtlstr.c
+25
-0
rtlstr.c
dlls/ntdll/tests/rtlstr.c
+1
-1
ntoskrnl.exe.spec
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+1
-1
No files found.
dlls/ntdll/ntdll.spec
View file @
9e509718
...
...
@@ -651,7 +651,7 @@
@ stub RtlGetUserInfoHeap
@ stdcall RtlGetVersion(ptr)
@ stub RtlGuidToPropertySetName
# @ stub RtlHashUnicodeString
@ stdcall RtlHashUnicodeString(ptr long long ptr)
@ stdcall RtlIdentifierAuthoritySid(ptr)
@ stdcall RtlImageDirectoryEntryToData(long long long ptr)
@ stdcall RtlImageNtHeader(long)
...
...
dlls/ntdll/ntdll_misc.h
View file @
9e509718
...
...
@@ -257,4 +257,8 @@ extern mode_t FILE_umask DECLSPEC_HIDDEN;
"ret $(4*" #args ")" )
/* fake ret to make copy protections happy */
#endif
#define HASH_STRING_ALGORITHM_DEFAULT 0
#define HASH_STRING_ALGORITHM_X65599 1
#define HASH_STRING_ALGORITHM_INVALID 0xffffffff
#endif
dlls/ntdll/rtlstr.c
View file @
9e509718
...
...
@@ -2138,3 +2138,28 @@ NTSTATUS WINAPI RtlStringFromGUID(const GUID* guid, UNICODE_STRING *str)
return
STATUS_SUCCESS
;
}
/******************************************************************************
* RtlHashUnicodeString [NTDLL.@]
*/
NTSTATUS
WINAPI
RtlHashUnicodeString
(
PCUNICODE_STRING
string
,
BOOLEAN
case_insensitive
,
ULONG
alg
,
ULONG
*
hash
)
{
unsigned
int
i
;
if
(
!
string
||
!
hash
)
return
STATUS_INVALID_PARAMETER
;
switch
(
alg
)
{
case
HASH_STRING_ALGORITHM_DEFAULT
:
case
HASH_STRING_ALGORITHM_X65599
:
break
;
default:
return
STATUS_INVALID_PARAMETER
;
}
*
hash
=
0
;
for
(
i
=
0
;
i
<
string
->
Length
/
sizeof
(
WCHAR
);
i
++
)
*
hash
=
*
hash
*
65599
+
(
case_insensitive
?
toupperW
(
string
->
Buffer
[
i
])
:
string
->
Buffer
[
i
]);
return
STATUS_SUCCESS
;
}
dlls/ntdll/tests/rtlstr.c
View file @
9e509718
...
...
@@ -1935,7 +1935,7 @@ static void test_RtlHashUnicodeString(void)
if
(
!
pRtlHashUnicodeString
)
{
skip
(
"RtlHashUnicodeString is not available
\n
"
);
win_
skip
(
"RtlHashUnicodeString is not available
\n
"
);
return
;
}
...
...
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
View file @
9e509718
...
...
@@ -1046,7 +1046,7 @@
@ stdcall RtlGetSaclSecurityDescriptor(ptr ptr ptr ptr) ntdll.RtlGetSaclSecurityDescriptor
@ stub RtlGetSetBootStatusData
@ stdcall RtlGetVersion(ptr) ntdll.RtlGetVersion
@ st
ub
RtlHashUnicodeString
@ st
dcall RtlHashUnicodeString(ptr long long ptr) ntdll.
RtlHashUnicodeString
@ stdcall RtlImageDirectoryEntryToData(long long long ptr) ntdll.RtlImageDirectoryEntryToData
@ stdcall RtlImageNtHeader(long) ntdll.RtlImageNtHeader
@ stdcall RtlInitAnsiString(ptr str) ntdll.RtlInitAnsiString
...
...
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