Commit 1d0fbb21 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

wshom.ocx: Implement Status property of IWshExec.

parent d9db9d8b
...@@ -180,10 +180,29 @@ static HRESULT WINAPI WshExec_Invoke(IWshExec *iface, DISPID dispIdMember, REFII ...@@ -180,10 +180,29 @@ static HRESULT WINAPI WshExec_Invoke(IWshExec *iface, DISPID dispIdMember, REFII
static HRESULT WINAPI WshExec_get_Status(IWshExec *iface, WshExecStatus *status) static HRESULT WINAPI WshExec_get_Status(IWshExec *iface, WshExecStatus *status)
{ {
WshExec *This = impl_from_IWshExec(iface); 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) static HRESULT WINAPI WshExec_get_StdIn(IWshExec *iface, ITextStream **stream)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment