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
49ef4f1c
Commit
49ef4f1c
authored
Aug 02, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wiaservc: Register the service from wine.inf.
parent
380abdeb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
39 deletions
+16
-39
wiaservc.inf
dlls/wiaservc/wiaservc.inf
+0
-4
wiaservc_main.c
dlls/wiaservc/wiaservc_main.c
+0
-35
wine.inf.in
tools/wine.inf.in
+16
-0
No files found.
dlls/wiaservc/wiaservc.inf
View file @
49ef4f1c
...
...
@@ -11,7 +11,3 @@ DelReg = WiaServc.Reg
HKCR,"AppID\%CLSID_WiaDevMgr%",,,"WIA Device Manager"
HKCR,"AppID\%CLSID_WiaDevMgr%","LocalService",,"stisvc"
HKCR,"CLSID\%CLSID_WiaDevMgr%","AppID",,"%CLSID_WiaDevMgr%"
HKLM,"Software\Microsoft\Windows NT\CurrentVersion\SvcHost","imgsvc",0x00010000,"StiSvc"
HKLM,"System\CurrentControlSet\Services\stisvc\Parameters","ServiceDll",0x00020000,"wiaservc.dll"
dlls/wiaservc/wiaservc_main.c
View file @
49ef4f1c
...
...
@@ -102,35 +102,6 @@ static void cleanup_register_strtable(STRTABLEA *strtable)
}
}
static
HRESULT
register_service
(
BOOL
do_register
)
{
static
const
WCHAR
name
[]
=
{
's'
,
't'
,
'i'
,
's'
,
'v'
,
'c'
,
0
};
static
const
WCHAR
path
[]
=
{
's'
,
'v'
,
'c'
,
'h'
,
'o'
,
's'
,
't'
,
'.'
,
'e'
,
'x'
,
'e'
,
' '
,
'-'
,
'k'
,
' '
,
'i'
,
'm'
,
'g'
,
's'
,
'v'
,
'c'
,
0
};
SC_HANDLE
scm
,
service
;
scm
=
OpenSCManagerW
(
NULL
,
NULL
,
SC_MANAGER_ALL_ACCESS
);
if
(
!
scm
)
return
SELFREG_E_CLASS
;
if
(
do_register
)
service
=
CreateServiceW
(
scm
,
name
,
name
,
SERVICE_ALL_ACCESS
,
SERVICE_WIN32_OWN_PROCESS
,
SERVICE_DEMAND_START
,
SERVICE_ERROR_NORMAL
,
path
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
else
service
=
OpenServiceW
(
scm
,
name
,
DELETE
);
CloseServiceHandle
(
scm
);
if
(
service
)
{
if
(
!
do_register
)
DeleteService
(
service
);
CloseServiceHandle
(
service
);
}
return
S_OK
;
}
/* Use an INF file to register or unregister the DLL */
static
HRESULT
register_server
(
BOOL
do_register
)
{
...
...
@@ -142,12 +113,6 @@ static HRESULT register_server(BOOL do_register)
TRACE
(
"(%x)
\n
"
,
do_register
);
hr
=
register_service
(
do_register
);
if
(
FAILED
(
hr
))
{
ERR
(
"register_service failed: %d
\n
"
,
GetLastError
());
return
hr
;
}
hAdvpack
=
LoadLibraryW
(
wszAdvpack
);
pRegInstall
=
(
void
*
)
GetProcAddress
(
hAdvpack
,
"RegInstall"
);
...
...
tools/wine.inf.in
View file @
49ef4f1c
...
...
@@ -126,18 +126,21 @@ AddReg=\
[DefaultInstall.Services]
AddService=MountMgr,0x800,MountMgrService
AddService=Spooler,0,SpoolerService
AddService=StiSvc,0,StiService
AddService=TermService,0,TerminalServices
AddService=PlugPlay,0,PlugPlayService
[DefaultInstall.NT.Services]
AddService=MountMgr,0x800,MountMgrService
AddService=Spooler,0,SpoolerService
AddService=StiSvc,0,StiService
AddService=TermService,0,TerminalServices
AddService=PlugPlay,0,PlugPlayService
[DefaultInstall.ntamd64.Services]
AddService=MountMgr,0x800,MountMgrService
AddService=Spooler,0,SpoolerService
AddService=StiSvc,0,StiService
AddService=TermService,0,TerminalServices
AddService=PlugPlay,0,PlugPlayService
...
...
@@ -2980,6 +2983,19 @@ ServiceType=32
StartType=3
ErrorControl=1
[StiService]
AddReg=StiServiceKeys
Description="WIA Service"
DisplayName="WIA Service"
ServiceBinary="%11%\svchost.exe -k imgsvc"
ServiceType=16
StartType=3
ErrorControl=1
[StiServiceKeys]
HKR,Parameters,"ServiceDll",,"%11%\wiaservc.dll"
HKLM,%CurrentVersionNT%\SvcHost,"imgsvc",0x00010000,"StiSvc"
[PlugPlayService]
Description="Enables automatic configuration of devices"
DisplayName="Plug and Play Service"
...
...
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