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
5c24f70c
Commit
5c24f70c
authored
Dec 15, 2008
by
Vincent Povirk
Committed by
Alexandre Julliard
Dec 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Display error messages in ShellExecuteEx.
parent
0a2ffa08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
shlexec.c
dlls/shell32/shlexec.c
+16
-1
No files found.
dlls/shell32/shlexec.c
View file @
5c24f70c
...
...
@@ -1447,6 +1447,16 @@ static UINT_PTR SHELL_execute_url( LPCWSTR lpFile, LPCWSTR wFile, LPCWSTR wcmd,
return
retval
;
}
static
void
do_error_dialog
(
UINT_PTR
retval
,
HWND
hwnd
)
{
WCHAR
msg
[
2048
];
int
error_code
=
GetLastError
();
FormatMessageW
(
FORMAT_MESSAGE_FROM_SYSTEM
,
NULL
,
error_code
,
0
,
msg
,
sizeof
(
msg
)
/
sizeof
(
WCHAR
),
NULL
);
MessageBoxW
(
hwnd
,
msg
,
NULL
,
MB_ICONERROR
);
}
/*************************************************************************
* SHELL_execute [Internal]
*/
...
...
@@ -1458,7 +1468,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
static
const
WCHAR
wHttp
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
0
};
static
const
DWORD
unsupportedFlags
=
SEE_MASK_INVOKEIDLIST
|
SEE_MASK_ICON
|
SEE_MASK_HOTKEY
|
SEE_MASK_CONNECTNETDRV
|
SEE_MASK_FLAG_DDEWAIT
|
SEE_MASK_FLAG_NO_UI
|
SEE_MASK_CONNECTNETDRV
|
SEE_MASK_FLAG_DDEWAIT
|
SEE_MASK_UNICODE
|
SEE_MASK_ASYNCOK
|
SEE_MASK_HMONITOR
;
WCHAR
parametersBuffer
[
1024
],
dirBuffer
[
MAX_PATH
],
wcmdBuffer
[
1024
];
...
...
@@ -1592,6 +1602,8 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
{
retval
=
SHELL_execute_class
(
wszApplicationName
,
&
sei_tmp
,
sei
,
execfunc
);
if
(
retval
<=
32
&&
!
(
sei_tmp
.
fMask
&
SEE_MASK_FLAG_NO_UI
))
do_error_dialog
(
retval
,
sei_tmp
.
hwnd
);
HeapFree
(
GetProcessHeap
(),
0
,
wszApplicationName
);
if
(
wszParameters
!=
parametersBuffer
)
HeapFree
(
GetProcessHeap
(),
0
,
wszParameters
);
...
...
@@ -1815,6 +1827,9 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
HeapFree
(
GetProcessHeap
(),
0
,
wcmd
);
sei
->
hInstApp
=
(
HINSTANCE
)(
retval
>
32
?
33
:
retval
);
if
(
retval
<=
32
&&
!
(
sei_tmp
.
fMask
&
SEE_MASK_FLAG_NO_UI
))
do_error_dialog
(
retval
,
sei_tmp
.
hwnd
);
return
retval
>
32
;
}
...
...
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