Nikolay Sivov : wshom.ocx: Implement Status property of IWshExec.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Mar 10 10:10:03 CDT 2015
Module: wine
Branch: master
Commit: 1d0fbb21602b62152edad807c4c3a317381a162a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1d0fbb21602b62152edad807c4c3a317381a162a
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Mon Mar 9 20:09:55 2015 +0300
wshom.ocx: Implement Status property of IWshExec.
---
dlls/wshom.ocx/shell.c | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/dlls/wshom.ocx/shell.c b/dlls/wshom.ocx/shell.c
index 38a07fe..6d1b80b 100644
--- a/dlls/wshom.ocx/shell.c
+++ b/dlls/wshom.ocx/shell.c
@@ -180,10 +180,29 @@ static HRESULT WINAPI WshExec_Invoke(IWshExec *iface, DISPID dispIdMember, REFII
static HRESULT WINAPI WshExec_get_Status(IWshExec *iface, WshExecStatus *status)
{
WshExec *This = impl_from_IWshExec(iface);
+ DWORD code;
- FIXME("(%p)->(%p): stub\n", This, status);
+ TRACE("(%p)->(%p)\n", This, status);
- return E_NOTIMPL;
+ if (!status)
+ return E_INVALIDARG;
+
+ if (!GetExitCodeProcess(This->info.hProcess, &code))
+ return HRESULT_FROM_WIN32(GetLastError());
+
+ switch (code)
+ {
+ case 0:
+ *status = WshFinished;
+ break;
+ case STILL_ACTIVE:
+ *status = WshRunning;
+ break;
+ default:
+ *status = WshFailed;
+ }
+
+ return S_OK;
}
static HRESULT WINAPI WshExec_get_StdIn(IWshExec *iface, ITextStream **stream)
More information about the wine-cvs
mailing list