mstask: Implement ITask::SetWorkItemData().
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f9c8c20298
commit
c00fbb5c0e
@ -58,6 +58,8 @@ typedef struct
|
|||||||
LONG ref;
|
LONG ref;
|
||||||
ITaskDefinition *task;
|
ITaskDefinition *task;
|
||||||
IExecAction *action;
|
IExecAction *action;
|
||||||
|
BYTE *data;
|
||||||
|
WORD data_count;
|
||||||
UUID uuid;
|
UUID uuid;
|
||||||
LPWSTR task_name;
|
LPWSTR task_name;
|
||||||
HRESULT status;
|
HRESULT status;
|
||||||
@ -87,6 +89,7 @@ static void TaskDestructor(TaskImpl *This)
|
|||||||
if (This->action)
|
if (This->action)
|
||||||
IExecAction_Release(This->action);
|
IExecAction_Release(This->action);
|
||||||
ITaskDefinition_Release(This->task);
|
ITaskDefinition_Release(This->task);
|
||||||
|
heap_free(This->data);
|
||||||
heap_free(This->task_name);
|
heap_free(This->task_name);
|
||||||
heap_free(This->accountName);
|
heap_free(This->accountName);
|
||||||
heap_free(This->trigger);
|
heap_free(This->trigger);
|
||||||
@ -809,13 +812,32 @@ static HRESULT WINAPI MSTASK_ITask_GetCreator(ITask *iface, LPWSTR *creator)
|
|||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI MSTASK_ITask_SetWorkItemData(
|
static HRESULT WINAPI MSTASK_ITask_SetWorkItemData(ITask *iface, WORD count, BYTE data[])
|
||||||
ITask* iface,
|
|
||||||
WORD cBytes,
|
|
||||||
BYTE rgbData[])
|
|
||||||
{
|
{
|
||||||
FIXME("(%p, %d, %p): stub\n", iface, cBytes, rgbData);
|
TaskImpl *This = impl_from_ITask(iface);
|
||||||
return E_NOTIMPL;
|
|
||||||
|
TRACE("(%p, %u, %p)\n", iface, count, data);
|
||||||
|
|
||||||
|
if (count)
|
||||||
|
{
|
||||||
|
if (!data) return E_INVALIDARG;
|
||||||
|
|
||||||
|
heap_free(This->data);
|
||||||
|
This->data = heap_alloc(count);
|
||||||
|
if (!This->data) return E_OUTOFMEMORY;
|
||||||
|
memcpy(This->data, data, count);
|
||||||
|
This->data_count = count;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (data) return E_INVALIDARG;
|
||||||
|
|
||||||
|
heap_free(This->data);
|
||||||
|
This->data = NULL;
|
||||||
|
This->data_count = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI MSTASK_ITask_GetWorkItemData(
|
static HRESULT WINAPI MSTASK_ITask_GetWorkItemData(
|
||||||
@ -1865,6 +1887,8 @@ HRESULT TaskConstructor(ITaskService *service, const WCHAR *name, ITask **task)
|
|||||||
This->IPersistFile_iface.lpVtbl = &MSTASK_IPersistFileVtbl;
|
This->IPersistFile_iface.lpVtbl = &MSTASK_IPersistFileVtbl;
|
||||||
This->ref = 1;
|
This->ref = 1;
|
||||||
This->task = taskdef;
|
This->task = taskdef;
|
||||||
|
This->data = NULL;
|
||||||
|
This->data_count = 0;
|
||||||
This->task_name = heap_strdupW(task_name);
|
This->task_name = heap_strdupW(task_name);
|
||||||
This->flags = 0;
|
This->flags = 0;
|
||||||
This->status = SCHED_S_TASK_NOT_SCHEDULED;
|
This->status = SCHED_S_TASK_NOT_SCHEDULED;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user