mstask: Implement ITask::DeleteTrigger().
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bcb50e2d12
commit
0049deca7a
@ -171,12 +171,21 @@ static HRESULT WINAPI MSTASK_ITask_CreateTrigger(ITask *iface, WORD *idx, ITaskT
|
|||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI MSTASK_ITask_DeleteTrigger(
|
static HRESULT WINAPI MSTASK_ITask_DeleteTrigger(ITask *iface, WORD idx)
|
||||||
ITask* iface,
|
|
||||||
WORD iTrigger)
|
|
||||||
{
|
{
|
||||||
FIXME("(%p, %d): stub\n", iface, iTrigger);
|
TaskImpl *This = impl_from_ITask(iface);
|
||||||
return E_NOTIMPL;
|
|
||||||
|
TRACE("(%p, %u)\n", iface, idx);
|
||||||
|
|
||||||
|
if (idx >= This->trigger_count)
|
||||||
|
return SCHED_E_TRIGGER_NOT_FOUND;
|
||||||
|
|
||||||
|
This->trigger_count--;
|
||||||
|
memmove(&This->trigger[idx], &This->trigger[idx + 1], (This->trigger_count - idx) * sizeof(This->trigger[0]));
|
||||||
|
/* this shouldn't fail in practice since we're shrinking the memory block */
|
||||||
|
This->trigger = heap_realloc(This->trigger, sizeof(This->trigger[0]) * This->trigger_count);
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI MSTASK_ITask_GetTriggerCount(ITask *iface, WORD *count)
|
static HRESULT WINAPI MSTASK_ITask_GetTriggerCount(ITask *iface, WORD *count)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user