Commit 49ef4f1c authored by Alexandre Julliard's avatar Alexandre Julliard

wiaservc: Register the service from wine.inf.

parent 380abdeb
......@@ -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"
......@@ -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");
......
......@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment