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
7475599b
Commit
7475599b
authored
Aug 16, 2007
by
Louis Lenders
Committed by
Alexandre Julliard
Aug 17, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Set USERNAME environment variable.
parent
d6e29316
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
process.c
dlls/kernel32/process.c
+19
-0
No files found.
dlls/kernel32/process.c
View file @
7475599b
...
...
@@ -418,6 +418,24 @@ static void set_registry_environment(void)
NtClose
(
attr
.
RootDirectory
);
}
/***********************************************************************
* set_additional_environment
*
* Set some additional environment variables not specified in the registry.
*/
static
void
set_additional_environment
(
void
)
{
static
const
WCHAR
usernameW
[]
=
{
'U'
,
'S'
,
'E'
,
'R'
,
'N'
,
'A'
,
'M'
,
'E'
,
0
};
const
char
*
name
=
wine_get_user_name
();
DWORD
len
=
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
name
,
-
1
,
NULL
,
0
);
if
(
len
)
{
LPWSTR
nameW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
name
,
-
1
,
nameW
,
len
);
SetEnvironmentVariableW
(
usernameW
,
nameW
);
HeapFree
(
GetProcessHeap
(),
0
,
nameW
);
}
}
/***********************************************************************
* set_library_wargv
...
...
@@ -745,6 +763,7 @@ static BOOL process_init(void)
convert_old_config
();
set_registry_environment
();
set_additional_environment
();
}
init_windows_dirs
();
...
...
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