Dmitry Timoshkov : mstask: Implement IPersistFile::GetClassID().
Alexandre Julliard
julliard at winehq.org
Fri Apr 20 17:55:42 CDT 2018
Module: wine
Branch: master
Commit: cbe3300b1e5de9b535dcecbc22ec4ebb76f35afe
URL: https://source.winehq.org/git/wine.git/?a=commit;h=cbe3300b1e5de9b535dcecbc22ec4ebb76f35afe
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Fri Apr 20 16:37:04 2018 +0800
mstask: Implement IPersistFile::GetClassID().
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mstask/task.c | 10 +++++-----
dlls/mstask/tests/task_scheduler.c | 8 ++++++++
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c
index 34d1fa0..c4e9f84 100644
--- a/dlls/mstask/task.c
+++ b/dlls/mstask/task.c
@@ -703,12 +703,12 @@ static ULONG WINAPI MSTASK_IPersistFile_Release(
return ref;
}
-static HRESULT WINAPI MSTASK_IPersistFile_GetClassID(
- IPersistFile* iface,
- CLSID *pClassID)
+static HRESULT WINAPI MSTASK_IPersistFile_GetClassID(IPersistFile *iface, CLSID *clsid)
{
- FIXME("(%p, %p): stub\n", iface, pClassID);
- return E_NOTIMPL;
+ TRACE("(%p, %p)\n", iface, clsid);
+
+ *clsid = CLSID_CTask;
+ return S_OK;
}
static HRESULT WINAPI MSTASK_IPersistFile_IsDirty(
diff --git a/dlls/mstask/tests/task_scheduler.c b/dlls/mstask/tests/task_scheduler.c
index e1e76e8..ddbb660 100644
--- a/dlls/mstask/tests/task_scheduler.c
+++ b/dlls/mstask/tests/task_scheduler.c
@@ -278,6 +278,7 @@ static WCHAR *get_task_curfile(ITask *task)
HRESULT hr;
IPersistFile *pfile;
WCHAR *curfile;
+ CLSID clsid;
hr = ITask_QueryInterface(task, &IID_IPersistFile, (void **)&pfile);
ok(hr == S_OK, "QueryInterface error %#x\n", hr);
@@ -288,6 +289,13 @@ todo_wine
todo_wine
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);
return curfile;
More information about the wine-cvs
mailing list