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
ed924587
Commit
ed924587
authored
Mar 11, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wshom.ocx: Implement Terminate().
parent
66e80602
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
3 deletions
+27
-3
Makefile.in
dlls/wshom.ocx/Makefile.in
+1
-1
shell.c
dlls/wshom.ocx/shell.c
+26
-2
No files found.
dlls/wshom.ocx/Makefile.in
View file @
ed924587
MODULE
=
wshom.ocx
IMPORTS
=
uuid oleaut32 ole32 shell32 advapi32
IMPORTS
=
uuid oleaut32 ole32 shell32
user32
advapi32
C_SRCS
=
\
shell.c
\
...
...
dlls/wshom.ocx/shell.c
View file @
ed924587
...
...
@@ -254,13 +254,37 @@ static HRESULT WINAPI WshExec_get_ExitCode(IWshExec *iface, DWORD *code)
return
E_NOTIMPL
;
}
BOOL
CALLBACK
enum_thread_wnd_proc
(
HWND
hwnd
,
LPARAM
lParam
)
{
INT
*
count
=
(
INT
*
)
lParam
;
(
*
count
)
++
;
PostMessageW
(
hwnd
,
WM_CLOSE
,
0
,
0
);
/* try to send it to all windows, even if failed for some */
return
TRUE
;
}
static
HRESULT
WINAPI
WshExec_Terminate
(
IWshExec
*
iface
)
{
WshExec
*
This
=
impl_from_IWshExec
(
iface
);
BOOL
ret
,
kill
=
FALSE
;
INT
count
=
0
;
FIXME
(
"(%p): stub
\n
"
,
This
);
TRACE
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
ret
=
EnumThreadWindows
(
This
->
info
.
dwThreadId
,
enum_thread_wnd_proc
,
(
LPARAM
)
&
count
);
if
(
ret
&&
count
)
{
/* manual testing shows that it waits 2 seconds before forcing termination */
if
(
WaitForSingleObject
(
This
->
info
.
hProcess
,
2000
)
!=
WAIT_OBJECT_0
)
kill
=
TRUE
;
}
else
kill
=
TRUE
;
if
(
kill
)
TerminateProcess
(
This
->
info
.
hProcess
,
0
);
return
S_OK
;
}
static
const
IWshExecVtbl
WshExecVtbl
=
{
...
...
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