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
a2c107fc
Commit
a2c107fc
authored
Dec 07, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Remove initialization of the global argv.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
94a3d4ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
31 deletions
+0
-31
kernel_main.c
dlls/kernel32/kernel_main.c
+0
-31
No files found.
dlls/kernel32/kernel_main.c
View file @
a2c107fc
...
...
@@ -78,43 +78,12 @@ static void set_entry_point( HMODULE module, const char *name, DWORD rva )
/***********************************************************************
* set_library_argv
*
* Set the Wine library argv global variable.
*/
static
void
set_library_argv
(
WCHAR
**
wargv
)
{
int
argc
;
char
*
p
,
**
argv
;
DWORD
total
=
0
;
/* convert argv back from Unicode since it has to be in the Ansi codepage not the Unix one */
for
(
argc
=
0
;
wargv
[
argc
];
argc
++
)
total
+=
WideCharToMultiByte
(
CP_ACP
,
0
,
wargv
[
argc
],
-
1
,
NULL
,
0
,
NULL
,
NULL
);
argv
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
total
+
(
argc
+
1
)
*
sizeof
(
*
argv
)
);
p
=
(
char
*
)(
argv
+
argc
+
1
);
for
(
argc
=
0
;
wargv
[
argc
];
argc
++
)
{
DWORD
reslen
=
WideCharToMultiByte
(
CP_ACP
,
0
,
wargv
[
argc
],
-
1
,
p
,
total
,
NULL
,
NULL
);
argv
[
argc
]
=
p
;
p
+=
reslen
;
total
-=
reslen
;
}
argv
[
argc
]
=
NULL
;
__wine_main_argv
=
argv
;
}
/***********************************************************************
* KERNEL process initialisation routine
*/
static
BOOL
process_attach
(
HMODULE
module
)
{
RTL_USER_PROCESS_PARAMETERS
*
params
=
NtCurrentTeb
()
->
Peb
->
ProcessParameters
;
set_library_argv
(
__wine_main_wargv
);
NtQuerySystemInformation
(
SystemBasicInformation
,
&
system_info
,
sizeof
(
system_info
),
NULL
);
/* Setup registry timezone information */
...
...
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