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
905e75f8
Commit
905e75f8
authored
Aug 18, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The argv array passed to the app needs to be in the Ansi codepage, not
the Unix one.
parent
b49f9145
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
process.c
dlls/kernel/process.c
+19
-0
No files found.
dlls/kernel/process.c
View file @
905e75f8
...
...
@@ -489,6 +489,7 @@ static void set_registry_environment(void)
static
void
set_library_wargv
(
char
**
argv
)
{
int
argc
;
char
*
q
;
WCHAR
*
p
;
WCHAR
**
wargv
;
DWORD
total
=
0
;
...
...
@@ -507,6 +508,24 @@ static void set_library_wargv( char **argv )
total
-=
reslen
;
}
wargv
[
argc
]
=
NULL
;
/* 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
)
);
q
=
(
char
*
)(
argv
+
argc
+
1
);
for
(
argc
=
0
;
wargv
[
argc
];
argc
++
)
{
DWORD
reslen
=
WideCharToMultiByte
(
CP_ACP
,
0
,
wargv
[
argc
],
-
1
,
q
,
total
,
NULL
,
NULL
);
argv
[
argc
]
=
q
;
q
+=
reslen
;
total
-=
reslen
;
}
argv
[
argc
]
=
NULL
;
__wine_main_argv
=
argv
;
__wine_main_wargv
=
wargv
;
}
...
...
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