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
ba709a1d
Commit
ba709a1d
authored
Dec 10, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mstask: Convert dll registration to the IRegistrar mechanism.
parent
0da53e3d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
127 deletions
+13
-127
Makefile.in
dlls/mstask/Makefile.in
+1
-2
mstask.inf
dlls/mstask/mstask.inf
+0
-16
mstask_main.c
dlls/mstask/mstask_main.c
+4
-89
rsrc.rc
dlls/mstask/rsrc.rc
+0
-20
mstask.idl
include/mstask.idl
+8
-0
No files found.
dlls/mstask/Makefile.in
View file @
ba709a1d
...
@@ -8,8 +8,7 @@ C_SRCS = \
...
@@ -8,8 +8,7 @@ C_SRCS = \
task_scheduler.c
\
task_scheduler.c
\
task_trigger.c
task_trigger.c
RC_SRCS
=
rsrc.rc
IDL_I_SRCS
=
mstask_local.idl
IDL_I_SRCS
=
mstask_local.idl
IDL_R_SRCS
=
mstask_local.idl
@MAKE_DLL_RULES@
@MAKE_DLL_RULES@
dlls/mstask/mstask.inf
deleted
100644 → 0
View file @
0da53e3d
[version]
Signature="$CHICAGO$"
[RegisterDll]
AddReg=Classes.Reg
[UnregisterDll]
DelReg=Classes.Reg
[Classes.Reg]
HKCR,"CLSID\%CLSID_CTaskScheduler%",,,"CTaskScheduler"
HKCR,"CLSID\%CLSID_CTaskScheduler%\InProcServer32",,,"mstask.dll"
HKCR,"CLSID\%CLSID_CTaskScheduler%\InProcServer32","ThreadingModel",,"Both"
HKCR,"CLSID\%CLSID_CTask%",,,"CTask"
HKCR,"CLSID\%CLSID_CTask%\InProcServer32",,,"mstask.dll"
HKCR,"CLSID\%CLSID_CTask%\InProcServer32","ThreadingModel",,"Both"
dlls/mstask/mstask_main.c
View file @
ba709a1d
...
@@ -19,8 +19,8 @@
...
@@ -19,8 +19,8 @@
#include <stdio.h>
#include <stdio.h>
#include "mstask_private.h"
#include "mstask_private.h"
#include "
winreg
.h"
#include "
objbase
.h"
#include "
advpub
.h"
#include "
rpcproxy
.h"
#include "wine/debug.h"
#include "wine/debug.h"
...
@@ -66,97 +66,12 @@ HRESULT WINAPI DllCanUnloadNow(void)
...
@@ -66,97 +66,12 @@ HRESULT WINAPI DllCanUnloadNow(void)
return
dll_ref
!=
0
?
S_FALSE
:
S_OK
;
return
dll_ref
!=
0
?
S_FALSE
:
S_OK
;
}
}
static
inline
char
*
mstask_strdup
(
const
char
*
s
)
{
size_t
n
=
strlen
(
s
)
+
1
;
char
*
d
=
HeapAlloc
(
GetProcessHeap
(),
0
,
n
);
return
d
?
memcpy
(
d
,
s
,
n
)
:
NULL
;
}
static
HRESULT
init_register_strtable
(
STRTABLEA
*
strtable
)
{
#define CLSID_EXPANSION_ENTRY(id) { "CLSID_" #id, &CLSID_ ## id }
static
const
struct
{
const
char
*
name
;
const
CLSID
*
clsid
;
}
expns
[]
=
{
CLSID_EXPANSION_ENTRY
(
CTaskScheduler
),
CLSID_EXPANSION_ENTRY
(
CTask
)
};
#undef CLSID_EXPANSION_ENTRY
static
STRENTRYA
pse
[
sizeof
expns
/
sizeof
expns
[
0
]];
unsigned
int
i
;
strtable
->
cEntries
=
sizeof
pse
/
sizeof
pse
[
0
];
strtable
->
pse
=
pse
;
for
(
i
=
0
;
i
<
strtable
->
cEntries
;
i
++
)
{
static
const
char
dummy_sample
[]
=
"{12345678-1234-1234-1234-123456789012}"
;
const
CLSID
*
clsid
=
expns
[
i
].
clsid
;
pse
[
i
].
pszName
=
mstask_strdup
(
expns
[
i
].
name
);
pse
[
i
].
pszValue
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
dummy_sample
);
if
(
!
pse
[
i
].
pszName
||
!
pse
[
i
].
pszValue
)
return
E_OUTOFMEMORY
;
sprintf
(
pse
[
i
].
pszValue
,
"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}"
,
clsid
->
Data1
,
clsid
->
Data2
,
clsid
->
Data3
,
clsid
->
Data4
[
0
],
clsid
->
Data4
[
1
],
clsid
->
Data4
[
2
],
clsid
->
Data4
[
3
],
clsid
->
Data4
[
4
],
clsid
->
Data4
[
5
],
clsid
->
Data4
[
6
],
clsid
->
Data4
[
7
]);
}
return
S_OK
;
}
static
void
cleanup_register_strtable
(
STRTABLEA
*
strtable
)
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
strtable
->
cEntries
;
i
++
)
{
HeapFree
(
GetProcessHeap
(),
0
,
strtable
->
pse
[
i
].
pszName
);
HeapFree
(
GetProcessHeap
(),
0
,
strtable
->
pse
[
i
].
pszValue
);
if
(
!
strtable
->
pse
[
i
].
pszName
||
!
strtable
->
pse
[
i
].
pszValue
)
return
;
}
}
static
HRESULT
register_mstask
(
BOOL
do_register
)
{
HRESULT
hr
;
STRTABLEA
strtable
;
HMODULE
hAdvpack
;
HRESULT
(
WINAPI
*
pRegInstall
)(
HMODULE
hm
,
LPCSTR
pszSection
,
const
STRTABLEA
*
pstTable
);
static
const
WCHAR
wszAdvpack
[]
=
{
'a'
,
'd'
,
'v'
,
'p'
,
'a'
,
'c'
,
'k'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
TRACE
(
"(%x)
\n
"
,
do_register
);
hAdvpack
=
LoadLibraryW
(
wszAdvpack
);
pRegInstall
=
(
void
*
)
GetProcAddress
(
hAdvpack
,
"RegInstall"
);
hr
=
init_register_strtable
(
&
strtable
);
if
(
SUCCEEDED
(
hr
))
hr
=
pRegInstall
(
hInst
,
do_register
?
"RegisterDll"
:
"UnregisterDll"
,
&
strtable
);
cleanup_register_strtable
(
&
strtable
);
if
(
FAILED
(
hr
))
WINE_ERR
(
"RegInstall failed: %08x
\n
"
,
hr
);
return
hr
;
}
HRESULT
WINAPI
DllRegisterServer
(
void
)
HRESULT
WINAPI
DllRegisterServer
(
void
)
{
{
return
register_mstask
(
TRUE
);
return
__wine_register_resources
(
hInst
,
NULL
);
}
}
HRESULT
WINAPI
DllUnregisterServer
(
void
)
HRESULT
WINAPI
DllUnregisterServer
(
void
)
{
{
return
register_mstask
(
FALSE
);
return
__wine_unregister_resources
(
hInst
,
NULL
);
}
}
dlls/mstask/rsrc.rc
deleted
100644 → 0
View file @
0da53e3d
/*
* Copyright 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
*/
/* @makedep: mstask.inf */
REGINST REGINST mstask.inf
include/mstask.idl
View file @
ba709a1d
...
@@ -22,6 +22,12 @@
...
@@ -22,6 +22,12 @@
import
"oaidl.idl"
;
import
"oaidl.idl"
;
import
"oleidl.idl"
;
import
"oleidl.idl"
;
#
ifndef
__WIDL__
#
define
threading
(
model
)
#
define
progid
(
str
)
#
define
vi_progid
(
str
)
#
endif
cpp_quote
(
"#define TASK_SUNDAY 0x1"
)
cpp_quote
(
"#define TASK_SUNDAY 0x1"
)
cpp_quote
(
"#define TASK_MONDAY 0x2"
)
cpp_quote
(
"#define TASK_MONDAY 0x2"
)
cpp_quote
(
"#define TASK_TUESDAY 0x4"
)
cpp_quote
(
"#define TASK_TUESDAY 0x4"
)
...
@@ -368,6 +374,7 @@ interface ITaskScheduler : IUnknown
...
@@ -368,6 +374,7 @@ interface ITaskScheduler : IUnknown
}
}
[
[
threading
(
both
),
uuid
(
148B
D52A
-
A2AB
-
11
CE
-
B11F
-
00
AA00530503
)
uuid
(
148B
D52A
-
A2AB
-
11
CE
-
B11F
-
00
AA00530503
)
]
]
coclass
CTaskScheduler
coclass
CTaskScheduler
...
@@ -377,6 +384,7 @@ coclass CTaskScheduler
...
@@ -377,6 +384,7 @@ coclass CTaskScheduler
[
[
threading
(
both
),
uuid
(
148B
D520
-
A2AB
-
11
CE
-
B11F
-
00
AA00530503
)
uuid
(
148B
D520
-
A2AB
-
11
CE
-
B11F
-
00
AA00530503
)
]
]
coclass
CTask
coclass
CTask
...
...
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