Commit 94256fcc authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

setupapi: Process interface sections in SetupDiInstallDriverFiles().

parent 1c25cc09
......@@ -101,6 +101,8 @@ static const WCHAR Phantom[] = {'P','h','a','n','t','o','m',0};
static const WCHAR SymbolicLink[] = {'S','y','m','b','o','l','i','c','L','i','n','k',0};
static const WCHAR Control[] = {'C','o','n','t','r','o','l',0};
static const WCHAR Linked[] = {'L','i','n','k','e','d',0};
static const WCHAR dotInterfaces[] = {'.','I','n','t','e','r','f','a','c','e','s',0};
static const WCHAR AddInterface[] = {'A','d','d','I','n','t','e','r','f','a','c','e',0};
static const WCHAR backslashW[] = {'\\',0};
static const WCHAR emptyW[] = {0};
......@@ -4559,7 +4561,7 @@ BOOL WINAPI SetupDiSelectBestCompatDrv(HDEVINFO devinfo, SP_DEVINFO_DATA *device
*/
BOOL WINAPI SetupDiInstallDriverFiles(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data)
{
WCHAR section[LINE_LEN], section_ext[LINE_LEN];
WCHAR section[LINE_LEN], section_ext[LINE_LEN], iface_section[LINE_LEN];
struct device *device;
struct driver *driver;
void *callback_ctx;
......@@ -4586,8 +4588,20 @@ BOOL WINAPI SetupDiInstallDriverFiles(HDEVINFO devinfo, SP_DEVINFO_DATA *device_
SetupDiGetActualSectionToInstallW(hinf, section, section_ext, ARRAY_SIZE(section_ext), NULL, NULL);
callback_ctx = SetupInitDefaultQueueCallback(NULL);
SetupInstallFromInfSectionW(NULL, hinf, section_ext, SPINST_FILES, NULL, NULL,
SP_COPY_NEWER_ONLY, SetupDefaultQueueCallbackW, callback_ctx, NULL, NULL);
lstrcatW(section_ext, dotInterfaces);
if (SetupFindFirstLineW(hinf, section_ext, AddInterface, &ctx))
{
do {
SetupGetStringFieldW(&ctx, 3, iface_section, ARRAY_SIZE(iface_section), NULL);
SetupInstallFromInfSectionW(NULL, hinf, iface_section, SPINST_FILES, NULL, NULL,
SP_COPY_NEWER_ONLY, SetupDefaultQueueCallbackW, callback_ctx, NULL, NULL);
} while (SetupFindNextMatchLineW(&ctx, AddInterface, &ctx));
}
SetupTermDefaultQueueCallback(callback_ctx);
SetupCloseInfFile(hinf);
......
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