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
5950c6af
Commit
5950c6af
authored
Oct 27, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Specify the full application path when starting builtin apps.
parent
0856f774
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
+17
-11
user_main.c
dlls/user32/user_main.c
+5
-3
win.c
dlls/user32/win.c
+12
-8
No files found.
dlls/user32/user_main.c
View file @
5950c6af
...
...
@@ -354,12 +354,14 @@ BOOL WINAPI ExitWindowsEx( UINT flags, DWORD reason )
static
const
WCHAR
forceW
[]
=
{
' '
,
'-'
,
'-'
,
'f'
,
'o'
,
'r'
,
'c'
,
'e'
,
0
};
static
const
WCHAR
shutdownW
[]
=
{
' '
,
'-'
,
'-'
,
's'
,
'h'
,
'u'
,
't'
,
'd'
,
'o'
,
'w'
,
'n'
,
0
};
WCHAR
app
[
MAX_PATH
];
WCHAR
cmdline
[
MAX_PATH
+
64
];
PROCESS_INFORMATION
pi
;
STARTUPINFOW
si
;
GetSystemDirectoryW
(
cmdline
,
MAX_PATH
);
lstrcatW
(
cmdline
,
winebootW
);
GetSystemDirectoryW
(
app
,
MAX_PATH
-
sizeof
(
winebootW
)
/
sizeof
(
WCHAR
)
);
strcatW
(
app
,
winebootW
);
strcpyW
(
cmdline
,
app
);
if
(
flags
&
EWX_FORCE
)
lstrcatW
(
cmdline
,
killW
);
else
...
...
@@ -371,7 +373,7 @@ BOOL WINAPI ExitWindowsEx( UINT flags, DWORD reason )
memset
(
&
si
,
0
,
sizeof
si
);
si
.
cb
=
sizeof
si
;
if
(
!
CreateProcessW
(
NULL
,
cmdline
,
NULL
,
NULL
,
FALSE
,
DETACHED_PROCESS
,
NULL
,
NULL
,
&
si
,
&
pi
))
if
(
!
CreateProcessW
(
app
,
cmdline
,
NULL
,
NULL
,
FALSE
,
DETACHED_PROCESS
,
NULL
,
NULL
,
&
si
,
&
pi
))
{
ERR
(
"Failed to run %s
\n
"
,
debugstr_w
(
cmdline
)
);
return
FALSE
;
...
...
dlls/user32/win.c
View file @
5950c6af
...
...
@@ -1852,11 +1852,13 @@ HWND WINAPI GetDesktopWindow(void)
if
(
!
GetUserObjectInformationW
(
GetProcessWindowStation
(),
UOI_FLAGS
,
&
flags
,
sizeof
(
flags
),
NULL
)
||
(
flags
.
dwFlags
&
WSF_VISIBLE
))
{
static
const
WCHAR
command_line
[]
=
{
'\\'
,
'e'
,
'x'
,
'p'
,
'l'
,
'o'
,
'r'
,
'e'
,
'r'
,
'.'
,
'e'
,
'x'
,
'e'
,
' '
,
'/'
,
'd'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
static
const
WCHAR
explorer
[]
=
{
'\\'
,
'e'
,
'x'
,
'p'
,
'l'
,
'o'
,
'r'
,
'e'
,
'r'
,
'.'
,
'e'
,
'x'
,
'e'
,
0
};
static
const
WCHAR
args
[]
=
{
' '
,
'/'
,
'd'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
STARTUPINFOW
si
;
PROCESS_INFORMATION
pi
;
WCHAR
systemdir
[
MAX_PATH
];
WCHAR
cmdline
[
MAX_PATH
+
sizeof
(
command_line
)
/
sizeof
(
WCHAR
)];
WCHAR
windir
[
MAX_PATH
];
WCHAR
app
[
MAX_PATH
+
sizeof
(
explorer
)
/
sizeof
(
WCHAR
)];
WCHAR
cmdline
[
MAX_PATH
+
(
sizeof
(
explorer
)
+
sizeof
(
args
))
/
sizeof
(
WCHAR
)];
memset
(
&
si
,
0
,
sizeof
(
si
)
);
si
.
cb
=
sizeof
(
si
);
...
...
@@ -1865,11 +1867,13 @@ HWND WINAPI GetDesktopWindow(void)
si
.
hStdOutput
=
0
;
si
.
hStdError
=
GetStdHandle
(
STD_ERROR_HANDLE
);
GetSystemDirectoryW
(
systemdir
,
MAX_PATH
);
lstrcpyW
(
cmdline
,
systemdir
);
lstrcatW
(
cmdline
,
command_line
);
if
(
CreateProcessW
(
NULL
,
cmdline
,
NULL
,
NULL
,
FALSE
,
DETACHED_PROCESS
,
NULL
,
systemdir
,
&
si
,
&
pi
))
GetWindowsDirectoryW
(
windir
,
MAX_PATH
);
strcpyW
(
app
,
windir
);
strcatW
(
app
,
explorer
);
strcpyW
(
cmdline
,
app
);
strcatW
(
cmdline
,
args
);
if
(
CreateProcessW
(
app
,
cmdline
,
NULL
,
NULL
,
FALSE
,
DETACHED_PROCESS
,
NULL
,
windir
,
&
si
,
&
pi
))
{
TRACE
(
"started explorer pid %04x tid %04x
\n
"
,
pi
.
dwProcessId
,
pi
.
dwThreadId
);
WaitForInputIdle
(
pi
.
hProcess
,
10000
);
...
...
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