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
c227edc5
Commit
c227edc5
authored
Sep 13, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RtlFormatCurrentUserKeyPath: return path containing the user name
instead of .Default.
parent
90d65280
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
10 deletions
+20
-10
reg.c
dlls/ntdll/reg.c
+20
-10
No files found.
dlls/ntdll/reg.c
View file @
c227edc5
...
...
@@ -28,14 +28,16 @@
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include <string.h>
#include "wine/debug.h"
#include "winreg.h"
#include "winerror.h"
#include "wine/unicode.h"
#include "wine/library.h"
#include "wine/server.h"
#include "winternl.h"
#include "ntdll_misc.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
reg
);
...
...
@@ -579,17 +581,25 @@ NTSTATUS WINAPI NtUnloadKey(
/******************************************************************************
* RtlFormatCurrentUserKeyPath [NTDLL.@]
*
* NOTE: under NT the user name part of the path is an SID.
*/
NTSTATUS
WINAPI
RtlFormatCurrentUserKeyPath
(
IN
OUT
PUNICODE_STRING
KeyPath
)
NTSTATUS
WINAPI
RtlFormatCurrentUserKeyPath
(
IN
OUT
PUNICODE_STRING
KeyPath
)
{
/* LPSTR Path = "\\REGISTRY\\USER\\S-1-5-21-0000000000-000000000-0000000000-500";*/
LPSTR
Path
=
"
\\
REGISTRY
\\
USER
\\
.DEFAULT"
;
ANSI_STRING
AnsiPath
;
const
char
*
user
=
wine_get_user_name
();
char
*
buffer
;
ANSI_STRING
AnsiPath
;
NTSTATUS
ret
;
if
(
!
(
buffer
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
strlen
(
user
)
+
16
)))
return
STATUS_NO_MEMORY
;
FIXME
(
"(%p) stub
\n
"
,
KeyPath
);
RtlInitAnsiString
(
&
AnsiPath
,
Path
);
return
RtlAnsiStringToUnicodeString
(
KeyPath
,
&
AnsiPath
,
TRUE
);
strcpy
(
buffer
,
"
\\
Registry
\\
User
\\
"
);
strcat
(
buffer
,
user
);
RtlInitAnsiString
(
&
AnsiPath
,
buffer
);
ret
=
RtlAnsiStringToUnicodeString
(
KeyPath
,
&
AnsiPath
,
TRUE
);
RtlFreeAnsiString
(
&
AnsiPath
);
return
ret
;
}
/******************************************************************************
...
...
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