Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
4f392cea
Commit
4f392cea
authored
Jul 17, 2008
by
Roy Shea
Committed by
Alexandre Julliard
Jul 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mstask: TaskScheduler stub with AddRef, QueryInterface, and Release.
parent
21fd0a04
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
217 additions
and
6 deletions
+217
-6
Makefile.in
dlls/mstask/Makefile.in
+3
-2
mstask_main.c
dlls/mstask/mstask_main.c
+1
-4
mstask_private.h
dlls/mstask/mstask_private.h
+39
-0
task_scheduler.c
dlls/mstask/task_scheduler.c
+174
-0
No files found.
dlls/mstask/Makefile.in
View file @
4f392cea
...
...
@@ -3,10 +3,11 @@ TOPOBJDIR = ../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
MODULE
=
mstask.dll
IMPORTS
=
kernel32
IMPORTS
=
uuid
kernel32
C_SRCS
=
\
mstask_main.c
mstask_main.c
\
task_scheduler.c
IDL_I_SRCS
=
mstask_local.idl
...
...
dlls/mstask/mstask_main.c
View file @
4f392cea
...
...
@@ -16,10 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "mstask_private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mstask
);
...
...
dlls/mstask/mstask_private.h
0 → 100644
View file @
4f392cea
/*
* Copyright (C) 2008 Google (Roy Shea)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __MSTASK_PRIVATE_H__
#define __MSTASK_PRIVATE_H__
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "mstask.h"
typedef
struct
{
const
ITaskSchedulerVtbl
*
lpVtbl
;
LONG
ref
;
}
TaskSchedulerImpl
;
extern
HRESULT
TaskSchedulerConstructor
(
LPVOID
*
ppObj
);
#endif
/* __MSTASK_PRIVATE_H__ */
dlls/mstask/task_scheduler.c
0 → 100644
View file @
4f392cea
/*
* Copyright (C) 2008 Google (Roy Shea)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "mstask_private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mstask
);
static
void
TaskSchedulerDestructor
(
TaskSchedulerImpl
*
This
)
{
TRACE
(
"%p
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
static
HRESULT
WINAPI
MSTASK_ITaskScheduler_QueryInterface
(
ITaskScheduler
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
TaskSchedulerImpl
*
This
=
(
TaskSchedulerImpl
*
)
iface
;
TRACE
(
"IID: %s
\n
"
,
debugstr_guid
(
riid
));
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_ITaskScheduler
))
{
*
ppvObject
=
&
This
->
lpVtbl
;
ITaskScheduler_AddRef
(
iface
);
return
S_OK
;
}
*
ppvObject
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
MSTASK_ITaskScheduler_AddRef
(
ITaskScheduler
*
iface
)
{
TaskSchedulerImpl
*
This
=
(
TaskSchedulerImpl
*
)
iface
;
TRACE
(
"
\n
"
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
ULONG
WINAPI
MSTASK_ITaskScheduler_Release
(
ITaskScheduler
*
iface
)
{
TaskSchedulerImpl
*
This
=
(
TaskSchedulerImpl
*
)
iface
;
ULONG
ref
;
TRACE
(
"
\n
"
);
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
TaskSchedulerDestructor
(
This
);
return
ref
;
}
static
HRESULT
WINAPI
MSTASK_ITaskScheduler_SetTargetComputer
(
ITaskScheduler
*
iface
,
LPCWSTR
pwszComputer
)
{
FIXME
(
"%p, %s: stub
\n
"
,
iface
,
debugstr_w
(
pwszComputer
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MSTASK_ITaskScheduler_GetTargetComputer
(
ITaskScheduler
*
iface
,
LPWSTR
*
ppwszComputer
)
{
FIXME
(
"%p, %p: stub
\n
"
,
iface
,
ppwszComputer
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MSTASK_ITaskScheduler_Enum
(
ITaskScheduler
*
iface
,
IEnumWorkItems
**
ppEnumTasks
)
{
FIXME
(
"%p, %p: stub
\n
"
,
iface
,
ppEnumTasks
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MSTASK_ITaskScheduler_Activate
(
ITaskScheduler
*
iface
,
LPCWSTR
pwszName
,
REFIID
riid
,
IUnknown
**
ppunk
)
{
FIXME
(
"%p, %s, %s, %p: stub
\n
"
,
iface
,
debugstr_w
(
pwszName
),
debugstr_guid
(
riid
),
ppunk
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MSTASK_ITaskScheduler_Delete
(
ITaskScheduler
*
iface
,
LPCWSTR
pwszName
)
{
FIXME
(
"%p, %s: stub
\n
"
,
iface
,
debugstr_w
(
pwszName
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MSTASK_ITaskScheduler_NewWorkItem
(
ITaskScheduler
*
iface
,
LPCWSTR
pwszTaskName
,
REFCLSID
rclsid
,
REFIID
riid
,
IUnknown
**
ppunk
)
{
FIXME
(
"%p, %s, %s, %s, %p: stub
\n
"
,
iface
,
debugstr_w
(
pwszTaskName
),
debugstr_guid
(
rclsid
)
,
debugstr_guid
(
riid
),
ppunk
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MSTASK_ITaskScheduler_AddWorkItem
(
ITaskScheduler
*
iface
,
LPCWSTR
pwszTaskName
,
IScheduledWorkItem
*
pWorkItem
)
{
FIXME
(
"%p, %s, %p: stub
\n
"
,
iface
,
debugstr_w
(
pwszTaskName
),
pWorkItem
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MSTASK_ITaskScheduler_IsOfType
(
ITaskScheduler
*
iface
,
LPCWSTR
pwszName
,
REFIID
riid
)
{
FIXME
(
"%p, %s, %s: stub
\n
"
,
iface
,
debugstr_w
(
pwszName
),
debugstr_guid
(
riid
));
return
E_NOTIMPL
;
}
static
const
ITaskSchedulerVtbl
MSTASK_ITaskSchedulerVtbl
=
{
MSTASK_ITaskScheduler_QueryInterface
,
MSTASK_ITaskScheduler_AddRef
,
MSTASK_ITaskScheduler_Release
,
MSTASK_ITaskScheduler_SetTargetComputer
,
MSTASK_ITaskScheduler_GetTargetComputer
,
MSTASK_ITaskScheduler_Enum
,
MSTASK_ITaskScheduler_Activate
,
MSTASK_ITaskScheduler_Delete
,
MSTASK_ITaskScheduler_NewWorkItem
,
MSTASK_ITaskScheduler_AddWorkItem
,
MSTASK_ITaskScheduler_IsOfType
};
HRESULT
TaskSchedulerConstructor
(
LPVOID
*
ppObj
)
{
TaskSchedulerImpl
*
This
;
TRACE
(
"(%p)
\n
"
,
ppObj
);
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
This
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
lpVtbl
=
&
MSTASK_ITaskSchedulerVtbl
;
This
->
ref
=
1
;
*
ppObj
=
&
This
->
lpVtbl
;
return
S_OK
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment