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
048588ed
Commit
048588ed
authored
Jun 25, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userenv: Build with msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
84f39259
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
Makefile.in
dlls/userenv/Makefile.in
+2
-0
userenv_main.c
dlls/userenv/userenv_main.c
+12
-13
No files found.
dlls/userenv/Makefile.in
View file @
048588ed
...
...
@@ -2,5 +2,7 @@ MODULE = userenv.dll
IMPORTS
=
advapi32
IMPORTLIB
=
userenv
EXTRADLLFLAGS
=
-mno-cygwin
C_SRCS
=
\
userenv_main.c
dlls/userenv/userenv_main.c
View file @
048588ed
...
...
@@ -32,7 +32,6 @@
#include "userenv.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
userenv
);
...
...
@@ -98,7 +97,7 @@ static void set_registry_variables(WCHAR **env, HKEY hkey, DWORD type, BOOL set_
{
static
const
WCHAR
SystemRootW
[]
=
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'R'
,
'o'
,
'o'
,
't'
,
0
};
static
const
WCHAR
SystemDriveW
[]
=
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'D'
,
'r'
,
'i'
,
'v'
,
'e'
,
0
};
static
const
WCHAR
PATHW
[]
=
{
'P'
,
'A'
,
'T'
,
'H'
};
static
const
WCHAR
PATHW
[]
=
{
'P'
,
'A'
,
'T'
,
'H'
,
0
};
UNICODE_STRING
us_name
,
us_value
;
WCHAR
name
[
1024
],
value
[
1024
];
...
...
@@ -111,19 +110,19 @@ static void set_registry_variables(WCHAR **env, HKEY hkey, DWORD type, BOOL set_
if
(
ret
!=
ERROR_SUCCESS
)
break
;
if
(
!
strcmpiW
(
name
,
SystemRootW
))
continue
;
if
(
!
strcmpiW
(
name
,
SystemDriveW
))
continue
;
if
(
!
wcsicmp
(
name
,
SystemRootW
))
continue
;
if
(
!
wcsicmp
(
name
,
SystemDriveW
))
continue
;
RtlInitUnicodeString
(
&
us_name
,
name
);
us_value
.
Buffer
=
value
;
us_value
.
MaximumLength
=
sizeof
(
value
);
if
(
!
strncmpiW
(
name
,
PATHW
,
ARRAY_SIZE
(
PATHW
))
&&
if
(
!
wcsnicmp
(
name
,
PATHW
,
ARRAY_SIZE
(
PATHW
))
&&
!
RtlQueryEnvironmentVariable_U
(
*
env
,
&
us_name
,
&
us_value
))
{
if
(
!
set_path
)
continue
;
size
=
strlenW
(
value
)
+
1
;
size
=
l
strlenW
(
value
)
+
1
;
if
(
!
get_reg_value
(
*
env
,
hkey
,
name
,
value
+
size
,
sizeof
(
value
)
-
size
*
sizeof
(
WCHAR
)))
continue
;
...
...
@@ -314,7 +313,7 @@ BOOL WINAPI CreateEnvironmentBlock( LPVOID* lpEnvironment,
{
if
(
get_reg_value
(
env
,
hkey
,
ProfilesDirectoryW
,
profiles_dir
,
MAX_PATH
-
sizeof
(
WCHAR
)))
{
len
=
strlenW
(
profiles_dir
);
len
=
l
strlenW
(
profiles_dir
);
if
(
profiles_dir
[
len
-
1
]
!=
'\\'
)
{
profiles_dir
[
len
++
]
=
'\\'
;
...
...
@@ -350,7 +349,7 @@ BOOL WINAPI CreateEnvironmentBlock( LPVOID* lpEnvironment,
{
if
(
profiles_dir
[
0
])
{
len
=
strlenW
(
profiles_dir
);
len
=
l
strlenW
(
profiles_dir
);
if
(
len
*
sizeof
(
WCHAR
)
+
sizeof
(
DefaultW
)
<
sizeof
(
buf
))
{
memcpy
(
buf
,
profiles_dir
,
len
*
sizeof
(
WCHAR
));
...
...
@@ -382,7 +381,7 @@ BOOL WINAPI CreateEnvironmentBlock( LPVOID* lpEnvironment,
return
FALSE
;
}
len
=
strlenW
(
profiles_dir
);
len
=
l
strlenW
(
profiles_dir
);
memcpy
(
buf
,
profiles_dir
,
len
*
sizeof
(
WCHAR
));
size
=
UNICODE_STRING_MAX_CHARS
-
len
;
...
...
@@ -402,7 +401,7 @@ BOOL WINAPI CreateEnvironmentBlock( LPVOID* lpEnvironment,
}
HeapFree
(
GetProcessHeap
(),
0
,
token_user
);
strcpyW
(
buf
,
sidW
);
l
strcpyW
(
buf
,
sidW
);
LocalFree
(
sidW
);
}
...
...
@@ -541,9 +540,9 @@ BOOL WINAPI GetUserProfileDirectoryW( HANDLE hToken, LPWSTR lpProfileDir,
*
lpcchSize
=
len
;
goto
done
;
}
strcpyW
(
lpProfileDir
,
dirW
);
strcatW
(
lpProfileDir
,
slashW
);
strcatW
(
lpProfileDir
,
userW
);
l
strcpyW
(
lpProfileDir
,
dirW
);
l
strcatW
(
lpProfileDir
,
slashW
);
l
strcatW
(
lpProfileDir
,
userW
);
*
lpcchSize
=
len
;
ret
=
TRUE
;
...
...
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