Author: akhaldi
Date: Sun Jul 19 23:05:56 2015
New Revision: 68463
URL:
http://svn.reactos.org/svn/reactos?rev=68463&view=rev
Log:
[MSTASK] Sync with Wine Staging 1.7.47. CORE-9924
Modified:
trunk/reactos/dll/win32/mstask/task_scheduler.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/mstask/task_scheduler.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mstask/task_sche…
==============================================================================
--- trunk/reactos/dll/win32/mstask/task_scheduler.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mstask/task_scheduler.c [iso-8859-1] Sun Jul 19 23:05:56 2015
@@ -26,9 +26,20 @@
LONG ref;
} TaskSchedulerImpl;
+typedef struct
+{
+ IEnumWorkItems IEnumWorkItems_iface;
+ LONG ref;
+} EnumWorkItemsImpl;
+
static inline TaskSchedulerImpl *impl_from_ITaskScheduler(ITaskScheduler *iface)
{
return CONTAINING_RECORD(iface, TaskSchedulerImpl, ITaskScheduler_iface);
+}
+
+static inline EnumWorkItemsImpl *impl_from_IEnumWorkItems(IEnumWorkItems *iface)
+{
+ return CONTAINING_RECORD(iface, EnumWorkItemsImpl, IEnumWorkItems_iface);
}
static void TaskSchedulerDestructor(TaskSchedulerImpl *This)
@@ -36,6 +47,103 @@
TRACE("%p\n", This);
HeapFree(GetProcessHeap(), 0, This);
InterlockedDecrement(&dll_ref);
+}
+
+static HRESULT WINAPI EnumWorkItems_QueryInterface(IEnumWorkItems *iface, REFIID riid,
void **obj)
+{
+ EnumWorkItemsImpl *This = impl_from_IEnumWorkItems(iface);
+
+ TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), obj);
+
+ if (IsEqualGUID(riid, &IID_IEnumWorkItems) || IsEqualGUID(riid,
&IID_IUnknown))
+ {
+ *obj = &This->IEnumWorkItems_iface;
+ IEnumWorkItems_AddRef(iface);
+ return S_OK;
+ }
+
+ *obj = NULL;
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI EnumWorkItems_AddRef(IEnumWorkItems *iface)
+{
+ EnumWorkItemsImpl *This = impl_from_IEnumWorkItems(iface);
+ ULONG ref = InterlockedIncrement(&This->ref);
+ TRACE("(%p)->(%u)\n", This, ref);
+ return ref;
+}
+
+static ULONG WINAPI EnumWorkItems_Release(IEnumWorkItems *iface)
+{
+ EnumWorkItemsImpl *This = impl_from_IEnumWorkItems(iface);
+ ULONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("(%p)->(%u)\n", This, ref);
+
+ if (ref == 0)
+ {
+ HeapFree(GetProcessHeap(), 0, This);
+ InterlockedDecrement(&dll_ref);
+ }
+
+ return ref;
+}
+
+static HRESULT WINAPI EnumWorkItems_Next(IEnumWorkItems *iface, ULONG count, LPWSTR
**names, ULONG *fetched)
+{
+ EnumWorkItemsImpl *This = impl_from_IEnumWorkItems(iface);
+ FIXME("(%p)->(%u %p %p): stub\n", This, count, names, fetched);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI EnumWorkItems_Skip(IEnumWorkItems *iface, ULONG count)
+{
+ EnumWorkItemsImpl *This = impl_from_IEnumWorkItems(iface);
+ FIXME("(%p)->(%u): stub\n", This, count);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI EnumWorkItems_Reset(IEnumWorkItems *iface)
+{
+ EnumWorkItemsImpl *This = impl_from_IEnumWorkItems(iface);
+ FIXME("(%p): stub\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI EnumWorkItems_Clone(IEnumWorkItems *iface, IEnumWorkItems
**cloned)
+{
+ EnumWorkItemsImpl *This = impl_from_IEnumWorkItems(iface);
+ FIXME("(%p)->(%p): stub\n", This, cloned);
+ return E_NOTIMPL;
+}
+
+static const IEnumWorkItemsVtbl EnumWorkItemsVtbl = {
+ EnumWorkItems_QueryInterface,
+ EnumWorkItems_AddRef,
+ EnumWorkItems_Release,
+ EnumWorkItems_Next,
+ EnumWorkItems_Skip,
+ EnumWorkItems_Reset,
+ EnumWorkItems_Clone
+};
+
+static HRESULT create_task_enum(IEnumWorkItems **ret)
+{
+ EnumWorkItemsImpl *tasks;
+
+ *ret = NULL;
+
+ tasks = HeapAlloc(GetProcessHeap(), 0, sizeof(*tasks));
+ if (!tasks)
+ return E_OUTOFMEMORY;
+
+ tasks->IEnumWorkItems_iface.lpVtbl = &EnumWorkItemsVtbl;
+ tasks->ref = 1;
+
+ *ret = &tasks->IEnumWorkItems_iface;
+ InterlockedIncrement(&dll_ref);
+ return S_OK;
}
static HRESULT WINAPI MSTASK_ITaskScheduler_QueryInterface(
@@ -138,10 +246,16 @@
static HRESULT WINAPI MSTASK_ITaskScheduler_Enum(
ITaskScheduler* iface,
- IEnumWorkItems **ppEnumTasks)
-{
- FIXME("%p, %p: stub\n", iface, ppEnumTasks);
- return E_NOTIMPL;
+ IEnumWorkItems **tasks)
+{
+ TaskSchedulerImpl *This = impl_from_ITaskScheduler(iface);
+
+ TRACE("(%p)->(%p)\n", This, tasks);
+
+ if (!tasks)
+ return E_INVALIDARG;
+
+ return create_task_enum(tasks);
}
static HRESULT WINAPI MSTASK_ITaskScheduler_Activate(
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jul 19 23:05:56 2015
@@ -127,7 +127,7 @@
reactos/dll/win32/msrle32 # Synced to WineStaging-1.7.37
reactos/dll/win32/mssign32 # Synced to WineStaging-1.7.37
reactos/dll/win32/mssip32 # Synced to WineStaging-1.7.37
-reactos/dll/win32/mstask # Synced to WineStaging-1.7.37
+reactos/dll/win32/mstask # Synced to WineStaging-1.7.47
reactos/dll/win32/msvcrt20 # Out of sync
reactos/dll/win32/msvcrt40 # Out of sync
reactos/dll/win32/msvfw32 # Synced to WineStaging-1.7.37