Commit cf78e6c3 authored by Alexandre Julliard's avatar Alexandre Julliard

setupapi: Implemented SetupInstallServicesFromInfSectionW.

parent 44ab294e
...@@ -166,7 +166,6 @@ static void test_install_svc_from(void) ...@@ -166,7 +166,6 @@ static void test_install_svc_from(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0);
ok(!ret, "Expected failure\n"); ok(!ret, "Expected failure\n");
todo_wine
ok(GetLastError() == ERROR_SECTION_NOT_FOUND, ok(GetLastError() == ERROR_SECTION_NOT_FOUND,
"Expected ERROR_SECTION_NOT_FOUND, got %08x\n", GetLastError()); "Expected ERROR_SECTION_NOT_FOUND, got %08x\n", GetLastError());
SetupCloseInfFile(infhandle); SetupCloseInfFile(infhandle);
...@@ -179,7 +178,6 @@ static void test_install_svc_from(void) ...@@ -179,7 +178,6 @@ static void test_install_svc_from(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0);
ok(!ret, "Expected failure\n"); ok(!ret, "Expected failure\n");
todo_wine
ok(GetLastError() == ERROR_SECTION_NOT_FOUND, ok(GetLastError() == ERROR_SECTION_NOT_FOUND,
"Expected ERROR_SECTION_NOT_FOUND, got %08x\n", GetLastError()); "Expected ERROR_SECTION_NOT_FOUND, got %08x\n", GetLastError());
SetupCloseInfFile(infhandle); SetupCloseInfFile(infhandle);
...@@ -192,7 +190,6 @@ static void test_install_svc_from(void) ...@@ -192,7 +190,6 @@ static void test_install_svc_from(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0);
ok(!ret, "Expected failure\n"); ok(!ret, "Expected failure\n");
todo_wine
ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT, ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT,
"Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError()); "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError());
SetupCloseInfFile(infhandle); SetupCloseInfFile(infhandle);
...@@ -205,7 +202,6 @@ static void test_install_svc_from(void) ...@@ -205,7 +202,6 @@ static void test_install_svc_from(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0);
ok(!ret, "Expected failure\n"); ok(!ret, "Expected failure\n");
todo_wine
ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT, ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT,
"Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError()); "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError());
SetupCloseInfFile(infhandle); SetupCloseInfFile(infhandle);
...@@ -218,7 +214,6 @@ static void test_install_svc_from(void) ...@@ -218,7 +214,6 @@ static void test_install_svc_from(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0);
ok(!ret, "Expected failure\n"); ok(!ret, "Expected failure\n");
todo_wine
ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT, ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT,
"Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError()); "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError());
SetupCloseInfFile(infhandle); SetupCloseInfFile(infhandle);
...@@ -231,7 +226,6 @@ static void test_install_svc_from(void) ...@@ -231,7 +226,6 @@ static void test_install_svc_from(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0);
ok(!ret, "Expected failure\n"); ok(!ret, "Expected failure\n");
todo_wine
ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT, ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT,
"Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError()); "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError());
SetupCloseInfFile(infhandle); SetupCloseInfFile(infhandle);
...@@ -244,7 +238,6 @@ static void test_install_svc_from(void) ...@@ -244,7 +238,6 @@ static void test_install_svc_from(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0);
ok(!ret, "Expected failure\n"); ok(!ret, "Expected failure\n");
todo_wine
ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT, ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT,
"Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError()); "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError());
SetupCloseInfFile(infhandle); SetupCloseInfFile(infhandle);
...@@ -256,12 +249,9 @@ static void test_install_svc_from(void) ...@@ -256,12 +249,9 @@ static void test_install_svc_from(void)
infhandle = SetupOpenInfFileA(path, NULL, INF_STYLE_WIN4, NULL); infhandle = SetupOpenInfFileA(path, NULL, INF_STYLE_WIN4, NULL);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0);
todo_wine
{
ok(ret, "Expected success\n"); ok(ret, "Expected success\n");
ok(GetLastError() == ERROR_SUCCESS, ok(GetLastError() == ERROR_SUCCESS,
"Expected ERROR_SUCCESS, got %08x\n", GetLastError()); "Expected ERROR_SUCCESS, got %08x\n", GetLastError());
}
SetupCloseInfFile(infhandle); SetupCloseInfFile(infhandle);
DeleteFile(inffile); DeleteFile(inffile);
...@@ -269,12 +259,10 @@ static void test_install_svc_from(void) ...@@ -269,12 +259,10 @@ static void test_install_svc_from(void)
/* Open the service to see if it's really there */ /* Open the service to see if it's really there */
svc_handle = OpenServiceA(scm_handle, "Winetest", DELETE); svc_handle = OpenServiceA(scm_handle, "Winetest", DELETE);
todo_wine
ok(svc_handle != NULL, "Service was not created\n"); ok(svc_handle != NULL, "Service was not created\n");
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = DeleteService(svc_handle); ret = DeleteService(svc_handle);
todo_wine
ok(ret, "Service could not be deleted : %d\n", GetLastError()); ok(ret, "Service could not be deleted : %d\n", GetLastError());
CloseServiceHandle(svc_handle); CloseServiceHandle(svc_handle);
......
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