Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
052de3f9
Commit
052de3f9
authored
Jan 24, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mstask: COM cleanup for the ITaskScheduler iface.
parent
73b6d21a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
12 deletions
+17
-12
mstask_private.h
dlls/mstask/mstask_private.h
+0
-6
task_scheduler.c
dlls/mstask/task_scheduler.c
+17
-6
No files found.
dlls/mstask/mstask_private.h
View file @
052de3f9
...
...
@@ -35,12 +35,6 @@ typedef struct ClassFactoryImpl ClassFactoryImpl;
extern
ClassFactoryImpl
MSTASK_ClassFactory
;
extern
HRESULT
TaskTriggerConstructor
(
LPVOID
*
ppObj
);
typedef
struct
{
const
ITaskSchedulerVtbl
*
lpVtbl
;
LONG
ref
;
}
TaskSchedulerImpl
;
extern
HRESULT
TaskSchedulerConstructor
(
LPVOID
*
ppObj
);
typedef
struct
...
...
dlls/mstask/task_scheduler.c
View file @
052de3f9
...
...
@@ -22,6 +22,17 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mstask
);
typedef
struct
{
ITaskScheduler
ITaskScheduler_iface
;
LONG
ref
;
}
TaskSchedulerImpl
;
static
inline
TaskSchedulerImpl
*
impl_from_ITaskScheduler
(
ITaskScheduler
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
TaskSchedulerImpl
,
ITaskScheduler_iface
);
}
static
void
TaskSchedulerDestructor
(
TaskSchedulerImpl
*
This
)
{
TRACE
(
"%p
\n
"
,
This
);
...
...
@@ -34,14 +45,14 @@ static HRESULT WINAPI MSTASK_ITaskScheduler_QueryInterface(
REFIID
riid
,
void
**
ppvObject
)
{
TaskSchedulerImpl
*
This
=
(
TaskSchedulerImpl
*
)
iface
;
TaskSchedulerImpl
*
This
=
impl_from_ITaskScheduler
(
iface
)
;
TRACE
(
"IID: %s
\n
"
,
debugstr_guid
(
riid
));
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_ITaskScheduler
))
{
*
ppvObject
=
&
This
->
lpVtbl
;
*
ppvObject
=
&
This
->
ITaskScheduler_iface
;
ITaskScheduler_AddRef
(
iface
);
return
S_OK
;
}
...
...
@@ -53,7 +64,7 @@ static HRESULT WINAPI MSTASK_ITaskScheduler_QueryInterface(
static
ULONG
WINAPI
MSTASK_ITaskScheduler_AddRef
(
ITaskScheduler
*
iface
)
{
TaskSchedulerImpl
*
This
=
(
TaskSchedulerImpl
*
)
iface
;
TaskSchedulerImpl
*
This
=
impl_from_ITaskScheduler
(
iface
)
;
TRACE
(
"
\n
"
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
...
...
@@ -61,7 +72,7 @@ static ULONG WINAPI MSTASK_ITaskScheduler_AddRef(
static
ULONG
WINAPI
MSTASK_ITaskScheduler_Release
(
ITaskScheduler
*
iface
)
{
TaskSchedulerImpl
*
This
=
(
TaskSchedulerImpl
*
)
iface
;
TaskSchedulerImpl
*
This
=
impl_from_ITaskScheduler
(
iface
)
;
ULONG
ref
;
TRACE
(
"
\n
"
);
ref
=
InterlockedDecrement
(
&
This
->
ref
);
...
...
@@ -178,10 +189,10 @@ HRESULT TaskSchedulerConstructor(LPVOID *ppObj)
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
lpVtbl
=
&
MSTASK_ITaskSchedulerVtbl
;
This
->
ITaskScheduler_iface
.
lpVtbl
=
&
MSTASK_ITaskSchedulerVtbl
;
This
->
ref
=
1
;
*
ppObj
=
&
This
->
lpVtbl
;
*
ppObj
=
&
This
->
ITaskScheduler_iface
;
InterlockedIncrement
(
&
dll_ref
);
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