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
d7e43c9e
Commit
d7e43c9e
authored
Nov 17, 2020
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userenv: Use wide-char string literals.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
48e35424
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
userenv_main.c
dlls/userenv/userenv_main.c
+6
-8
No files found.
dlls/userenv/userenv_main.c
View file @
d7e43c9e
...
...
@@ -418,7 +418,6 @@ BOOL WINAPI GetUserProfileDirectoryA( HANDLE hToken, LPSTR lpProfileDir,
BOOL
WINAPI
GetUserProfileDirectoryW
(
HANDLE
hToken
,
LPWSTR
lpProfileDir
,
LPDWORD
lpcchSize
)
{
static
const
WCHAR
slashW
[]
=
{
'\\'
,
0
};
TOKEN_USER
*
t
;
WCHAR
*
userW
=
NULL
,
*
dirW
=
NULL
;
DWORD
len
,
dir_len
,
domain_len
;
...
...
@@ -459,7 +458,7 @@ BOOL WINAPI GetUserProfileDirectoryW( HANDLE hToken, LPWSTR lpProfileDir,
goto
done
;
}
lstrcpyW
(
lpProfileDir
,
dirW
);
lstrcatW
(
lpProfileDir
,
slashW
);
lstrcatW
(
lpProfileDir
,
L"
\\
"
);
lstrcatW
(
lpProfileDir
,
userW
);
*
lpcchSize
=
len
;
ret
=
TRUE
;
...
...
@@ -533,11 +532,8 @@ end:
return
ret
;
}
static
const
WCHAR
ProfileListW
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
' '
,
'N'
,
'T'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'\\'
,
'P'
,
'r'
,
'o'
,
'f'
,
'i'
,
'l'
,
'e'
,
'L'
,
'i'
,
's'
,
't'
,
0
};
BOOL
WINAPI
GetProfilesDirectoryW
(
LPWSTR
lpProfilesDir
,
LPDWORD
lpcchSize
)
{
static
const
WCHAR
ProfilesDirectory
[]
=
{
'P'
,
'r'
,
'o'
,
'f'
,
'i'
,
'l'
,
'e'
,
's'
,
'D'
,
'i'
,
'r'
,
'e'
,
'c'
,
't'
,
'o'
,
'r'
,
'y'
,
0
};
LONG
l
;
HKEY
key
;
BOOL
ret
=
FALSE
;
...
...
@@ -552,13 +548,15 @@ BOOL WINAPI GetProfilesDirectoryW( LPWSTR lpProfilesDir, LPDWORD lpcchSize )
return
FALSE
;
}
l
=
RegOpenKeyExW
(
HKEY_LOCAL_MACHINE
,
ProfileListW
,
0
,
KEY_READ
,
&
key
);
l
=
RegOpenKeyExW
(
HKEY_LOCAL_MACHINE
,
L"Software
\\
Microsoft
\\
Windows NT
\\
CurrentVersion
\\
ProfileList"
,
0
,
KEY_READ
,
&
key
);
if
(
l
)
{
SetLastError
(
l
);
return
FALSE
;
}
l
=
RegQueryValueExW
(
key
,
ProfilesDirectory
,
NULL
,
NULL
,
NULL
,
&
len
);
l
=
RegQueryValueExW
(
key
,
L"ProfilesDirectory"
,
NULL
,
NULL
,
NULL
,
&
len
);
if
(
l
)
{
SetLastError
(
l
);
...
...
@@ -570,7 +568,7 @@ BOOL WINAPI GetProfilesDirectoryW( LPWSTR lpProfilesDir, LPDWORD lpcchSize )
SetLastError
(
ERROR_OUTOFMEMORY
);
goto
end
;
}
l
=
RegQueryValueExW
(
key
,
ProfilesDirectory
,
NULL
,
NULL
,
l
=
RegQueryValueExW
(
key
,
L"ProfilesDirectory"
,
NULL
,
NULL
,
(
BYTE
*
)
unexpanded_profiles_dir
,
&
len
);
if
(
l
)
{
...
...
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