setupapi: Return the section name in SetupDiGetActualSectionToInstall() even if it doesn't exist.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-05-17 00:21:10 -05:00 committed by Alexandre Julliard
parent 6244f05941
commit 23320d05b6
2 changed files with 1 additions and 15 deletions

View File

@ -1879,17 +1879,7 @@ BOOL WINAPI SetupDiGetActualSectionToInstallW(
}
if (lLineCount == -1)
{
/* Test section name without extension */
szBuffer[dwLength] = 0;
lLineCount = SetupGetLineCountW(InfHandle, szBuffer);
}
if (lLineCount == -1)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
szBuffer[dwLength] = 0;
dwFullLength = lstrlenW(szBuffer);

View File

@ -2074,7 +2074,6 @@ static void test_get_actual_section(void)
ok(!strcasecmp(section, "section7"), "Got unexpected section %s.\n", section);
ok(!extptr || !*extptr /* Windows 10 1809 */, "Got extension %s.\n", extptr);
todo_wine {
extptr = section;
ret = SetupDiGetActualSectionToInstallA(hinf, "section8", section, ARRAY_SIZE(section), NULL, &extptr);
ok(ret, "Failed to get section, error %#x.\n", GetLastError());
@ -2086,7 +2085,6 @@ todo_wine {
ok(ret, "Failed to get section, error %#x.\n", GetLastError());
ok(!strcasecmp(section, "nonexistent"), "Got unexpected section %s.\n", section);
ok(!extptr || !*extptr /* Windows 10 1809 */, "Got extension %s.\n", extptr);
}
extptr = section;
ret = SetupDiGetActualSectionToInstallA(hinf, "section9", section, ARRAY_SIZE(section), NULL, &extptr);
@ -2094,7 +2092,6 @@ todo_wine {
ok(!strcasecmp(section, "section9.NT" MYEXT), "Got unexpected section %s.\n", section);
ok(extptr == section + 8, "Got extension %s.\n", extptr);
todo_wine {
if (0)
{
/* For some reason, this call hangs on Windows 10 1809. */
@ -2104,7 +2101,6 @@ todo_wine {
ok(!strcasecmp(section, "section10"), "Got unexpected section %s.\n", section);
ok(!extptr, "Got extension %s.\n", extptr);
}
}
SetupCloseInfFile(hinf);
ret = DeleteFileA(inf_path);