Alexandre Julliard : setupapi: Install services in InstallHinfSection.
Alexandre Julliard
julliard at winehq.org
Wed Apr 16 08:09:45 CDT 2008
Module: wine
Branch: master
Commit: c7e661b8e5a0c339ef09e89cc759dc6620e14541
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c7e661b8e5a0c339ef09e89cc759dc6620e14541
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Apr 16 12:36:18 2008 +0200
setupapi: Install services in InstallHinfSection.
---
dlls/setupapi/install.c | 5 ++++-
dlls/setupapi/tests/install.c | 2 --
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/setupapi/install.c b/dlls/setupapi/install.c
index 13a114b..321d4d4 100644
--- a/dlls/setupapi/install.c
+++ b/dlls/setupapi/install.c
@@ -1032,8 +1032,9 @@ void WINAPI InstallHinfSectionW( HWND hwnd, HINSTANCE handle, LPCWSTR cmdline, I
static const WCHAR nt_platformW[] = {'.','n','t',0};
#endif
static const WCHAR nt_genericW[] = {'.','n','t',0};
+ static const WCHAR servicesW[] = {'.','S','e','r','v','i','c','e','s',0};
- WCHAR *s, *path, section[MAX_PATH + sizeof(nt_platformW)/sizeof(WCHAR)];
+ WCHAR *s, *path, section[MAX_PATH + (sizeof(nt_platformW) + sizeof(servicesW)) / sizeof(WCHAR)];
void *callback_context;
UINT mode;
HINF hinf;
@@ -1076,6 +1077,8 @@ void WINAPI InstallHinfSectionW( HWND hwnd, HINSTANCE handle, LPCWSTR cmdline, I
SetupDefaultQueueCallbackW, callback_context,
NULL, NULL );
SetupTermDefaultQueueCallback( callback_context );
+ strcatW( section, servicesW );
+ SetupInstallServicesFromInfSectionW( hinf, section, 0 );
SetupCloseInfFile( hinf );
/* FIXME: should check the mode and maybe reboot */
diff --git a/dlls/setupapi/tests/install.c b/dlls/setupapi/tests/install.c
index de93192..0044f01 100644
--- a/dlls/setupapi/tests/install.c
+++ b/dlls/setupapi/tests/install.c
@@ -329,12 +329,10 @@ static void test_driver_install(void)
/* Open the service to see if it's really there */
svc_handle = OpenServiceA(scm_handle, "Winetest", DELETE);
- todo_wine
ok(svc_handle != NULL, "Service was not created\n");
SetLastError(0xdeadbeef);
ret = DeleteService(svc_handle);
- todo_wine
ok(ret, "Service could not be deleted : %d\n", GetLastError());
CloseServiceHandle(svc_handle);
More information about the wine-cvs
mailing list