if (hKey != INVALID_HANDLE_VALUE)
RegCloseKey(hKey);
+ if (Buffer && !ret)
+ MyFree(Buffer);
+
return ret;
}
}
/* Finally, add the overlay icons to the image list */
- for (i = 0; i < 2; i++)
+ for (i = 0; i <= 2; i++)
{
hIcon = LoadImage(hInstance, MAKEINTRESOURCE(500 + i), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
if (hIcon)
{
idx = ImageList_AddIcon(ClassImageListData->ImageList, hIcon);
if (idx != -1)
- ImageList_SetOverlayImage(ClassImageListData->ImageList, idx, i);
+ ImageList_SetOverlayImage(ClassImageListData->ImageList, idx, i + 1);
DestroyIcon(hIcon);
}
}
InstallParams.cbSize = sizeof(SP_DEVINSTALL_PARAMS);
if (!SetupDiGetDeviceInstallParamsW(hDeviceInfo, NULL, &InstallParams))
goto cleanup;
+
InstallParams.Flags &= ~(DI_NOVCP | DI_NOBROWSE | DI_QUIETINSTALL);
InstallParams.Flags |= Flags & (DI_NOVCP | DI_NOBROWSE | DI_QUIETINSTALL);
if (Flags & DI_NOVCP)
if (!ret)
goto cleanup;
- /* Install .Services section */
+ /* OPTIONAL: Install .Services section */
lstrcatW(SectionName, DotServices);
- ret = SetupInstallServicesFromInfSectionExW(
+ SetupInstallServicesFromInfSectionExW(
hInf,
SectionName,
0,
NULL,
NULL,
NULL);
- if (!ret)
- goto cleanup;
-
ret = TRUE;
}