Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
58b1b6b7
Commit
58b1b6b7
authored
11 years ago
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
taskschd: Add Task Scheduler class factory.
parent
b0600964
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/taskschd/taskschd.c
+113
-0
113 additions, 0 deletions
dlls/taskschd/taskschd.c
dlls/taskschd/taskschd.spec
+2
-2
2 additions, 2 deletions
dlls/taskschd/taskschd.spec
with
115 additions
and
2 deletions
dlls/taskschd/taskschd.c
+
113
−
0
View file @
58b1b6b7
...
...
@@ -26,11 +26,92 @@
#include
"windef.h"
#include
"winbase.h"
#include
"objbase.h"
#include
"taskschd.h"
#include
"taskschd_private.h"
#include
"wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
taskschd
);
typedef
struct
{
IClassFactory
IClassFactory_iface
;
HRESULT
(
*
constructor
)(
void
**
);
}
TaskScheduler_factory
;
static
inline
TaskScheduler_factory
*
impl_from_IClassFactory
(
IClassFactory
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
TaskScheduler_factory
,
IClassFactory_iface
);
}
static
HRESULT
WINAPI
factory_QueryInterface
(
IClassFactory
*
iface
,
REFIID
riid
,
LPVOID
*
obj
)
{
if
(
!
riid
||
!
obj
)
return
E_INVALIDARG
;
TRACE
(
"%p,%s,%p
\n
"
,
iface
,
debugstr_guid
(
riid
),
obj
);
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IClassFactory
))
{
IClassFactory_AddRef
(
iface
);
*
obj
=
iface
;
return
S_OK
;
}
*
obj
=
NULL
;
FIXME
(
"interface %s is not implemented
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
factory_AddRef
(
IClassFactory
*
iface
)
{
return
2
;
}
static
ULONG
WINAPI
factory_Release
(
IClassFactory
*
iface
)
{
return
1
;
}
static
HRESULT
WINAPI
factory_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
outer
,
REFIID
riid
,
void
**
obj
)
{
TaskScheduler_factory
*
factory
=
impl_from_IClassFactory
(
iface
);
IUnknown
*
unknown
;
HRESULT
hr
;
if
(
!
riid
||
!
obj
)
return
E_INVALIDARG
;
TRACE
(
"%p,%s,%p
\n
"
,
outer
,
debugstr_guid
(
riid
),
obj
);
*
obj
=
NULL
;
if
(
outer
)
return
CLASS_E_NOAGGREGATION
;
hr
=
factory
->
constructor
((
void
**
)
&
unknown
);
if
(
hr
!=
S_OK
)
return
hr
;
hr
=
IUnknown_QueryInterface
(
unknown
,
riid
,
obj
);
IUnknown_Release
(
unknown
);
return
hr
;
}
static
HRESULT
WINAPI
factory_LockServer
(
IClassFactory
*
iface
,
BOOL
lock
)
{
FIXME
(
"%p,%d: stub
\n
"
,
iface
,
lock
);
return
S_OK
;
}
static
const
struct
IClassFactoryVtbl
factory_vtbl
=
{
factory_QueryInterface
,
factory_AddRef
,
factory_Release
,
factory_CreateInstance
,
factory_LockServer
};
static
TaskScheduler_factory
TaskScheduler_cf
=
{
{
&
factory_vtbl
},
TaskService_create
};
/******************************************************************
* DllMain
*/
...
...
@@ -48,6 +129,38 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved)
return
TRUE
;
}
/***********************************************************************
* DllGetClassObject
*/
HRESULT
WINAPI
DllGetClassObject
(
REFCLSID
rclsid
,
REFIID
riid
,
LPVOID
*
obj
)
{
IClassFactory
*
factory
=
NULL
;
if
(
!
rclsid
||
!
riid
||
!
obj
)
return
E_INVALIDARG
;
TRACE
(
"%s,%s,%p
\n
"
,
debugstr_guid
(
rclsid
),
debugstr_guid
(
riid
),
obj
);
*
obj
=
NULL
;
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_TaskScheduler
))
{
factory
=
&
TaskScheduler_cf
.
IClassFactory_iface
;
}
if
(
factory
)
return
IClassFactory_QueryInterface
(
factory
,
riid
,
obj
);
FIXME
(
"class %s/%s is not implemented
\n
"
,
debugstr_guid
(
rclsid
),
debugstr_guid
(
riid
));
return
CLASS_E_CLASSNOTAVAILABLE
;
}
/***********************************************************************
* DllCanUnloadNow
*/
HRESULT
WINAPI
DllCanUnloadNow
(
void
)
{
return
S_FALSE
;
}
const
char
*
debugstr_variant
(
const
VARIANT
*
v
)
{
if
(
!
v
)
return
"(null)"
;
...
...
This diff is collapsed.
Click to expand it.
dlls/taskschd/taskschd.spec
+
2
−
2
View file @
58b1b6b7
@ st
ub
DllCanUnloadNow
@ st
ub
DllGetClassObject
@ st
dcall -private
DllCanUnloadNow
()
@ st
dcall -private
DllGetClassObject
(ptr ptr ptr)
@ stub DllGetVersion
@ stub DllRegisterServer
@ stub DllUnregisterServer
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment