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
2b99e1c1
Commit
2b99e1c1
authored
Jun 08, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Make sure we always have a valid process title.
parent
e091c12b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
18 deletions
+18
-18
environ.c
dlls/kernel32/environ.c
+2
-4
process.c
dlls/kernel32/process.c
+4
-2
process.c
dlls/kernel32/tests/process.c
+12
-12
No files found.
dlls/kernel32/environ.c
View file @
2b99e1c1
...
...
@@ -468,11 +468,9 @@ void ENV_CopyStartupInformation(void)
startup_infoA
.
cb
=
sizeof
(
startup_infoA
);
startup_infoA
.
lpReserved
=
NULL
;
startup_infoA
.
lpDesktop
=
(
rupp
->
Desktop
.
Length
&&
RtlUnicodeStringToAnsiString
(
&
ansi
,
&
rupp
->
Desktop
,
TRUE
)
==
STATUS_SUCCESS
)
?
startup_infoA
.
lpDesktop
=
RtlUnicodeStringToAnsiString
(
&
ansi
,
&
rupp
->
Desktop
,
TRUE
)
==
STATUS_SUCCESS
?
ansi
.
Buffer
:
NULL
;
startup_infoA
.
lpTitle
=
(
rupp
->
WindowTitle
.
Length
&&
RtlUnicodeStringToAnsiString
(
&
ansi
,
&
rupp
->
WindowTitle
,
TRUE
)
==
STATUS_SUCCESS
)
?
startup_infoA
.
lpTitle
=
RtlUnicodeStringToAnsiString
(
&
ansi
,
&
rupp
->
WindowTitle
,
TRUE
)
==
STATUS_SUCCESS
?
ansi
.
Buffer
:
NULL
;
startup_infoA
.
dwX
=
rupp
->
dwX
;
startup_infoA
.
dwY
=
rupp
->
dwY
;
...
...
dlls/kernel32/process.c
View file @
2b99e1c1
...
...
@@ -1481,6 +1481,7 @@ static startup_info_t *create_startup_info( LPCWSTR filename, LPCWSTR cmdline,
const
STARTUPINFOW
*
startup
,
DWORD
*
info_size
)
{
const
RTL_USER_PROCESS_PARAMETERS
*
cur_params
;
const
WCHAR
*
title
;
startup_info_t
*
info
;
DWORD
size
;
void
*
ptr
;
...
...
@@ -1510,13 +1511,14 @@ static startup_info_t *create_startup_info( LPCWSTR filename, LPCWSTR cmdline,
else
cur_dir
=
cur_params
->
CurrentDirectory
.
DosPath
.
Buffer
;
}
title
=
startup
->
lpTitle
?
startup
->
lpTitle
:
imagepath
;
size
=
sizeof
(
*
info
);
size
+=
strlenW
(
cur_dir
)
*
sizeof
(
WCHAR
);
size
+=
cur_params
->
DllPath
.
Length
;
size
+=
strlenW
(
imagepath
)
*
sizeof
(
WCHAR
);
size
+=
strlenW
(
cmdline
)
*
sizeof
(
WCHAR
);
if
(
startup
->
lpTitle
)
size
+=
strlenW
(
startup
->
lpT
itle
)
*
sizeof
(
WCHAR
);
size
+=
strlenW
(
t
itle
)
*
sizeof
(
WCHAR
);
if
(
startup
->
lpDesktop
)
size
+=
strlenW
(
startup
->
lpDesktop
)
*
sizeof
(
WCHAR
);
/* FIXME: shellinfo */
if
(
startup
->
lpReserved2
&&
startup
->
cbReserved2
)
size
+=
startup
->
cbReserved2
;
...
...
@@ -1575,7 +1577,7 @@ static startup_info_t *create_startup_info( LPCWSTR filename, LPCWSTR cmdline,
ptr
=
(
char
*
)
ptr
+
cur_params
->
DllPath
.
Length
;
info
->
imagepath_len
=
append_string
(
&
ptr
,
imagepath
);
info
->
cmdline_len
=
append_string
(
&
ptr
,
cmdline
);
i
f
(
startup
->
lpTitle
)
info
->
title_len
=
append_string
(
&
ptr
,
startup
->
lpT
itle
);
i
nfo
->
title_len
=
append_string
(
&
ptr
,
t
itle
);
if
(
startup
->
lpDesktop
)
info
->
desktop_len
=
append_string
(
&
ptr
,
startup
->
lpDesktop
);
if
(
startup
->
lpReserved2
&&
startup
->
cbReserved2
)
{
...
...
dlls/kernel32/tests/process.c
View file @
2b99e1c1
...
...
@@ -661,7 +661,7 @@ static void test_Startup(void)
WritePrivateProfileStringA
(
NULL
,
NULL
,
NULL
,
resfile
);
okChildInt
(
"StartupInfoA"
,
"cb"
,
startup
.
cb
);
todo_wine
okChildString
(
"StartupInfoA"
,
"lpDesktop"
,
startup
.
lpDesktop
);
okChildString
(
"StartupInfoA"
,
"lpDesktop"
,
startup
.
lpDesktop
);
okChildString
(
"StartupInfoA"
,
"lpTitle"
,
startup
.
lpTitle
);
okChildInt
(
"StartupInfoA"
,
"dwX"
,
startup
.
dwX
);
okChildInt
(
"StartupInfoA"
,
"dwY"
,
startup
.
dwY
);
...
...
@@ -701,8 +701,8 @@ static void test_Startup(void)
okChildInt
(
"StartupInfoA"
,
"cb"
,
startup
.
cb
);
okChildString
(
"StartupInfoA"
,
"lpDesktop"
,
startup
.
lpDesktop
);
result
=
getChildString
(
"StartupInfoA"
,
"lpTitle"
);
todo_wine
ok
(
broken
(
!
result
)
||
(
result
&&
!
strCmp
(
result
,
selfname
,
0
)),
"expected '%s' or null, got '%s'
\n
"
,
selfname
,
result
);
ok
(
broken
(
!
result
)
||
(
result
&&
!
strCmp
(
result
,
selfname
,
0
)),
"expected '%s' or null, got '%s'
\n
"
,
selfname
,
result
);
okChildInt
(
"StartupInfoA"
,
"dwX"
,
startup
.
dwX
);
okChildInt
(
"StartupInfoA"
,
"dwY"
,
startup
.
dwY
);
okChildInt
(
"StartupInfoA"
,
"dwXSize"
,
startup
.
dwXSize
);
...
...
@@ -740,7 +740,7 @@ static void test_Startup(void)
okChildInt
(
"StartupInfoA"
,
"cb"
,
startup
.
cb
);
okChildString
(
"StartupInfoA"
,
"lpDesktop"
,
startup
.
lpDesktop
);
todo_wine
okChildString
(
"StartupInfoA"
,
"lpTitle"
,
startup
.
lpTitle
);
okChildString
(
"StartupInfoA"
,
"lpTitle"
,
startup
.
lpTitle
);
okChildInt
(
"StartupInfoA"
,
"dwX"
,
startup
.
dwX
);
okChildInt
(
"StartupInfoA"
,
"dwY"
,
startup
.
dwY
);
okChildInt
(
"StartupInfoA"
,
"dwXSize"
,
startup
.
dwXSize
);
...
...
@@ -777,8 +777,8 @@ static void test_Startup(void)
WritePrivateProfileStringA
(
NULL
,
NULL
,
NULL
,
resfile
);
okChildInt
(
"StartupInfoA"
,
"cb"
,
startup
.
cb
);
todo_wine
okChildString
(
"StartupInfoA"
,
"lpDesktop"
,
startup
.
lpDesktop
);
todo_wine
okChildString
(
"StartupInfoA"
,
"lpTitle"
,
startup
.
lpTitle
);
okChildString
(
"StartupInfoA"
,
"lpDesktop"
,
startup
.
lpDesktop
);
okChildString
(
"StartupInfoA"
,
"lpTitle"
,
startup
.
lpTitle
);
okChildInt
(
"StartupInfoA"
,
"dwX"
,
startup
.
dwX
);
okChildInt
(
"StartupInfoA"
,
"dwY"
,
startup
.
dwY
);
okChildInt
(
"StartupInfoA"
,
"dwXSize"
,
startup
.
dwXSize
);
...
...
@@ -1214,8 +1214,8 @@ static void test_SuspendFlag(void)
okChildInt
(
"StartupInfoA"
,
"cb"
,
startup
.
cb
);
okChildString
(
"StartupInfoA"
,
"lpDesktop"
,
us
.
lpDesktop
);
result
=
getChildString
(
"StartupInfoA"
,
"lpTitle"
);
todo_wine
ok
(
broken
(
!
result
)
||
(
result
&&
!
strCmp
(
result
,
selfname
,
0
)),
"expected '%s' or null, got '%s'
\n
"
,
selfname
,
result
);
ok
(
broken
(
!
result
)
||
(
result
&&
!
strCmp
(
result
,
selfname
,
0
)),
"expected '%s' or null, got '%s'
\n
"
,
selfname
,
result
);
okChildInt
(
"StartupInfoA"
,
"dwX"
,
startup
.
dwX
);
okChildInt
(
"StartupInfoA"
,
"dwY"
,
startup
.
dwY
);
okChildInt
(
"StartupInfoA"
,
"dwXSize"
,
startup
.
dwXSize
);
...
...
@@ -1276,8 +1276,8 @@ static void test_DebuggingFlag(void)
okChildInt
(
"StartupInfoA"
,
"cb"
,
startup
.
cb
);
okChildString
(
"StartupInfoA"
,
"lpDesktop"
,
us
.
lpDesktop
);
result
=
getChildString
(
"StartupInfoA"
,
"lpTitle"
);
todo_wine
ok
(
broken
(
!
result
)
||
(
result
&&
!
strCmp
(
result
,
selfname
,
0
)),
"expected '%s' or null, got '%s'
\n
"
,
selfname
,
result
);
ok
(
broken
(
!
result
)
||
(
result
&&
!
strCmp
(
result
,
selfname
,
0
)),
"expected '%s' or null, got '%s'
\n
"
,
selfname
,
result
);
okChildInt
(
"StartupInfoA"
,
"dwX"
,
startup
.
dwX
);
okChildInt
(
"StartupInfoA"
,
"dwY"
,
startup
.
dwY
);
okChildInt
(
"StartupInfoA"
,
"dwXSize"
,
startup
.
dwXSize
);
...
...
@@ -1389,8 +1389,8 @@ static void test_Console(void)
okChildInt
(
"StartupInfoA"
,
"cb"
,
startup
.
cb
);
okChildString
(
"StartupInfoA"
,
"lpDesktop"
,
us
.
lpDesktop
);
result
=
getChildString
(
"StartupInfoA"
,
"lpTitle"
);
todo_wine
ok
(
broken
(
!
result
)
||
(
result
&&
!
strCmp
(
result
,
selfname
,
0
)),
"expected '%s' or null, got '%s'
\n
"
,
selfname
,
result
);
ok
(
broken
(
!
result
)
||
(
result
&&
!
strCmp
(
result
,
selfname
,
0
)),
"expected '%s' or null, got '%s'
\n
"
,
selfname
,
result
);
okChildInt
(
"StartupInfoA"
,
"dwX"
,
startup
.
dwX
);
okChildInt
(
"StartupInfoA"
,
"dwY"
,
startup
.
dwY
);
okChildInt
(
"StartupInfoA"
,
"dwXSize"
,
startup
.
dwXSize
);
...
...
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