mstask: Implement IPersistFile::GetClassID().

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2018-04-20 16:37:04 +08:00 committed by Alexandre Julliard
parent bf5589311d
commit cbe3300b1e
2 changed files with 13 additions and 5 deletions

View File

@ -703,12 +703,12 @@ static ULONG WINAPI MSTASK_IPersistFile_Release(
return ref; return ref;
} }
static HRESULT WINAPI MSTASK_IPersistFile_GetClassID( static HRESULT WINAPI MSTASK_IPersistFile_GetClassID(IPersistFile *iface, CLSID *clsid)
IPersistFile* iface,
CLSID *pClassID)
{ {
FIXME("(%p, %p): stub\n", iface, pClassID); TRACE("(%p, %p)\n", iface, clsid);
return E_NOTIMPL;
*clsid = CLSID_CTask;
return S_OK;
} }
static HRESULT WINAPI MSTASK_IPersistFile_IsDirty( static HRESULT WINAPI MSTASK_IPersistFile_IsDirty(

View File

@ -278,6 +278,7 @@ static WCHAR *get_task_curfile(ITask *task)
HRESULT hr; HRESULT hr;
IPersistFile *pfile; IPersistFile *pfile;
WCHAR *curfile; WCHAR *curfile;
CLSID clsid;
hr = ITask_QueryInterface(task, &IID_IPersistFile, (void **)&pfile); hr = ITask_QueryInterface(task, &IID_IPersistFile, (void **)&pfile);
ok(hr == S_OK, "QueryInterface error %#x\n", hr); ok(hr == S_OK, "QueryInterface error %#x\n", hr);
@ -288,6 +289,13 @@ todo_wine
todo_wine todo_wine
ok(curfile && curfile[0] , "curfile should not be NULL\n"); ok(curfile && curfile[0] , "curfile should not be NULL\n");
if (0) /* crashes under Windows */
hr = IPersistFile_GetClassID(pfile, NULL);
hr = IPersistFile_GetClassID(pfile, &clsid);
ok(hr == S_OK, "GetClassID error %#x\n", hr);
ok(IsEqualCLSID(&clsid, &CLSID_CTask), "got %s\n", wine_dbgstr_guid(&clsid));
IPersistFile_Release(pfile); IPersistFile_Release(pfile);
return curfile; return curfile;