mstask: Implement IPersistFile::GetCurFile().
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
caafc3c637
commit
ce0d9956f5
|
@ -1069,12 +1069,17 @@ static HRESULT WINAPI MSTASK_IPersistFile_SaveCompleted(
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MSTASK_IPersistFile_GetCurFile(
|
||||
IPersistFile* iface,
|
||||
LPOLESTR *ppszFileName)
|
||||
static HRESULT WINAPI MSTASK_IPersistFile_GetCurFile(IPersistFile *iface, LPOLESTR *file_name)
|
||||
{
|
||||
FIXME("(%p, %p): stub\n", iface, ppszFileName);
|
||||
return E_NOTIMPL;
|
||||
TaskImpl *This = impl_from_IPersistFile(iface);
|
||||
|
||||
TRACE("(%p, %p)\n", iface, file_name);
|
||||
|
||||
*file_name = CoTaskMemAlloc((strlenW(This->task_name) + 1) * sizeof(WCHAR));
|
||||
if (!*file_name) return E_OUTOFMEMORY;
|
||||
|
||||
strcpyW(*file_name, This->task_name);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const ITaskVtbl MSTASK_ITaskVtbl =
|
||||
|
|
|
@ -284,9 +284,7 @@ static WCHAR *get_task_curfile(ITask *task)
|
|||
ok(hr == S_OK, "QueryInterface error %#x\n", hr);
|
||||
curfile = NULL;
|
||||
hr = IPersistFile_GetCurFile(pfile, &curfile);
|
||||
todo_wine
|
||||
ok(hr == S_OK, "GetCurFile error %#x\n", hr);
|
||||
todo_wine
|
||||
ok(curfile && curfile[0] , "curfile should not be NULL\n");
|
||||
|
||||
if (0) /* crashes under Windows */
|
||||
|
@ -326,7 +324,6 @@ static void test_task_storage(void)
|
|||
|
||||
curfile = get_task_curfile(task);
|
||||
ok(!file_exists(curfile), "curfile should not exist\n");
|
||||
todo_wine
|
||||
ok(!lstrcmpW(curfile, task_full_name), "name is wrong %s\n", wine_dbgstr_w(curfile));
|
||||
|
||||
hr = ITaskScheduler_NewWorkItem(scheduler, Task1, &CLSID_CTask, &IID_ITask, (IUnknown **)&task2);
|
||||
|
@ -335,7 +332,6 @@ todo_wine
|
|||
|
||||
curfile2 = get_task_curfile(task);
|
||||
ok(!file_exists(curfile2), "curfile2 should not exist\n");
|
||||
todo_wine
|
||||
ok(!lstrcmpW(curfile2, task_full_name), "name is wrong %s\n", wine_dbgstr_w(curfile2));
|
||||
|
||||
CoTaskMemFree(curfile);
|
||||
|
|
Loading…
Reference in New Issue