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
dab03963
Commit
dab03963
authored
Jul 22, 2008
by
Roy Shea
Committed by
Alexandre Julliard
Jul 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mstask: Implement ClassFactory, DllGetClassObject, and DllCanUnloadNow.
parent
74dc990b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
141 additions
and
2 deletions
+141
-2
Makefile.in
dlls/mstask/Makefile.in
+1
-0
factory.c
dlls/mstask/factory.c
+108
-0
mstask.spec
dlls/mstask/mstask.spec
+2
-2
mstask_main.c
dlls/mstask/mstask_main.c
+19
-0
mstask_private.h
dlls/mstask/mstask_private.h
+9
-0
task_scheduler.c
dlls/mstask/task_scheduler.c
+2
-0
No files found.
dlls/mstask/Makefile.in
View file @
dab03963
...
...
@@ -6,6 +6,7 @@ MODULE = mstask.dll
IMPORTS
=
uuid kernel32
C_SRCS
=
\
factory.c
\
mstask_main.c
\
task_scheduler.c
...
...
dlls/mstask/factory.c
0 → 100644
View file @
dab03963
/*
* 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
HRESULT
WINAPI
MSTASK_IClassFactory_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppvObj
)
{
ClassFactoryImpl
*
This
=
(
ClassFactoryImpl
*
)
iface
;
TRACE
(
"IID: %s
\n
"
,
debugstr_guid
(
riid
));
if
(
ppvObj
==
NULL
)
return
E_POINTER
;
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IClassFactory
))
{
*
ppvObj
=
&
This
->
lpVtbl
;
IClassFactory_AddRef
(
iface
);
return
S_OK
;
}
WARN
(
"Unknown interface: %s
\n
"
,
debugstr_guid
(
riid
));
*
ppvObj
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
MSTASK_IClassFactory_AddRef
(
LPCLASSFACTORY
iface
)
{
TRACE
(
"
\n
"
);
InterlockedIncrement
(
&
dll_ref
);
return
2
;
}
static
ULONG
WINAPI
MSTASK_IClassFactory_Release
(
LPCLASSFACTORY
iface
)
{
TRACE
(
"
\n
"
);
InterlockedDecrement
(
&
dll_ref
);
return
1
;
}
static
HRESULT
WINAPI
MSTASK_IClassFactory_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pUnkOuter
,
REFIID
riid
,
LPVOID
*
ppvObj
)
{
HRESULT
res
;
IUnknown
*
punk
=
NULL
;
*
ppvObj
=
NULL
;
TRACE
(
"IID: %s
\n
"
,
debugstr_guid
(
riid
));
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
res
=
TaskSchedulerConstructor
((
LPVOID
*
)
&
punk
);
if
(
FAILED
(
res
))
return
res
;
res
=
ITaskScheduler_QueryInterface
(
punk
,
riid
,
ppvObj
);
ITaskScheduler_Release
(
punk
);
return
res
;
}
static
HRESULT
WINAPI
MSTASK_IClassFactory_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
fLock
)
{
TRACE
(
"
\n
"
);
if
(
fLock
!=
FALSE
)
MSTASK_IClassFactory_AddRef
(
iface
);
else
MSTASK_IClassFactory_Release
(
iface
);
return
S_OK
;
}
static
const
IClassFactoryVtbl
IClassFactory_Vtbl
=
{
MSTASK_IClassFactory_QueryInterface
,
MSTASK_IClassFactory_AddRef
,
MSTASK_IClassFactory_Release
,
MSTASK_IClassFactory_CreateInstance
,
MSTASK_IClassFactory_LockServer
};
ClassFactoryImpl
MSTASK_ClassFactory
=
{
&
IClassFactory_Vtbl
};
dlls/mstask/mstask.spec
View file @
dab03963
@ stub ConvertAtJobsToTasks
@ st
ub DllCanUnloadNow
@ st
ub DllGetClassObject
@ st
dcall -private DllCanUnloadNow()
@ st
dcall -private DllGetClassObject(ptr ptr ptr)
@ stub GetNetScheduleAccountInformation
@ stub NetrJobAdd
@ stub NetrJobDel
...
...
dlls/mstask/mstask_main.c
View file @
dab03963
...
...
@@ -21,6 +21,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mstask
);
LONG
dll_ref
=
0
;
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
{
TRACE
(
"(%p, %d, %p)
\n
"
,
hinstDLL
,
fdwReason
,
lpvReserved
);
...
...
@@ -38,3 +40,20 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
return
TRUE
;
}
HRESULT
WINAPI
DllGetClassObject
(
REFCLSID
rclsid
,
REFIID
iid
,
LPVOID
*
ppv
)
{
TRACE
(
"(%s %s %p)
\n
"
,
debugstr_guid
(
rclsid
),
debugstr_guid
(
iid
),
ppv
);
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_CTaskScheduler
))
{
return
IClassFactory_QueryInterface
((
LPCLASSFACTORY
)
&
MSTASK_ClassFactory
,
iid
,
ppv
);
}
FIXME
(
"Not supported class: %s
\n
"
,
debugstr_guid
(
rclsid
));
return
CLASS_E_CLASSNOTAVAILABLE
;
}
HRESULT
WINAPI
DllCanUnloadNow
(
void
)
{
return
dll_ref
!=
0
?
S_FALSE
:
S_OK
;
}
dlls/mstask/mstask_private.h
View file @
dab03963
...
...
@@ -29,6 +29,15 @@
#include "ole2.h"
#include "mstask.h"
extern
LONG
dll_ref
;
typedef
struct
{
const
IClassFactoryVtbl
*
lpVtbl
;
LONG
ref
;
}
ClassFactoryImpl
;
extern
ClassFactoryImpl
MSTASK_ClassFactory
;
typedef
struct
{
const
ITaskSchedulerVtbl
*
lpVtbl
;
...
...
dlls/mstask/task_scheduler.c
View file @
dab03963
...
...
@@ -25,6 +25,7 @@ static void TaskSchedulerDestructor(TaskSchedulerImpl *This)
{
TRACE
(
"%p
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
InterlockedDecrement
(
&
dll_ref
);
}
static
HRESULT
WINAPI
MSTASK_ITaskScheduler_QueryInterface
(
...
...
@@ -170,5 +171,6 @@ HRESULT TaskSchedulerConstructor(LPVOID *ppObj)
This
->
ref
=
1
;
*
ppObj
=
&
This
->
lpVtbl
;
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