44 InstallParams.
cbSize =
sizeof(InstallParams);
49 DPRINT(
"SetupDiGetDeviceInstallParams() failed with error 0x%lx\n", rc);
59 DPRINT(
"SetupDiSetDeviceInstallParams() failed with error 0x%lx\n", rc);
68 DPRINT(
"SetupDiInstallDevice() failed with error 0x%lx\n", rc);
73 DriverInfoData.
cbSize =
sizeof(DriverInfoData);
78 DPRINT(
"SetupDiGetSelectedDriver() failed with error 0x%lx\n", rc);
82 DriverInfoDetailData.
cbSize =
sizeof(DriverInfoDetailData);
84 &DriverInfoData, &DriverInfoDetailData,
85 sizeof(DriverInfoDetailData),
NULL);
89 DPRINT(
"SetupDiGetDriverInfoDetail() failed with error 0x%lx\n", rc);
97 DPRINT(
"SetupOpenInfFile() failed with error 0x%lx\n", rc);
111 DPRINT(
"SetupDiGetActualSectionToInstall() failed with error 0x%lx\n", rc);
114 hr =
StringCbCat(SectionName,
sizeof(SectionName),
_T(
".SoftwareSettings"));
129 DPRINT(
"SetupDiOpenDevRegKey() failed with error 0x%lx\n", rc);
133 hDriverKey,
L"Settings",
140 NULL, &hSettingsKey, &disposition);
143 DPRINT(
"RegCreateKeyEx() failed with error 0x%lx\n", rc);
156 DPRINT(
"SetupInstallFromInfSection() failed with error 0x%lx\n", rc);
168 DPRINT(
"SetupDiGetDeviceRegistryProperty() failed with error 0x%lx\n", rc);
177 DPRINT(
"RegOpenKeyEx() failed with error 0x%lx\n", rc);
185 DPRINT(
"RegOpenKeyEx() failed with error 0x%lx\n", rc);
190 for (wIndex = 0; wIndex < 9999; wIndex++)
197 &hDeviceSubKey, &disposition);
200 DPRINT(
"RegCreateKeyEx() failed with error 0x%lx\n", rc);
210 DPRINT(
"RegCreateKeyEx() failed\n");
215 hDeviceSubKey =
NULL;
229 DPRINT(
"SetupInstallFromInfSection() failed with error 0x%lx\n", rc);
236 _T(
"Device Description"),
243 DPRINT(
"RegSetValueEx() failed with error 0x%lx\n", rc);
251 EnumDisplayDevices(
NULL, 0, &DisplayDevice, 0);
263 if (hSettingsKey !=
NULL)
267 if (hServiceKey !=
NULL)
269 if (hDeviceSubKey !=
NULL)
static WCHAR ServiceName[]
static HANDLE hServicesKey
#define RegCloseKey(hKey)
DWORD WINAPI DisplayClassInstaller(IN DI_FUNCTION InstallFunction, IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL)
DWORD WINAPI MonitorClassInstaller(IN DI_FUNCTION InstallFunction, IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL)
#define ERROR_INSUFFICIENT_BUFFER
#define INVALID_HANDLE_VALUE
static void cleanup(void)
BOOL WINAPI SetupDiInstallDevice(IN HDEVINFO DeviceInfoSet, IN OUT PSP_DEVINFO_DATA DeviceInfoData)
HKEY WINAPI SetupDiOpenDevRegKey(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, DWORD Scope, DWORD HwProfile, DWORD KeyType, REGSAM samDesired)
#define KEY_CREATE_SUB_KEY
#define REG_OPTION_NON_VOLATILE
#define REG_CREATED_NEW_KEY
#define KEY_ENUMERATE_SUB_KEYS
#define MAX_SERVICE_NAME_LEN
#define SetupDiGetActualSectionToInstall
#define SetupDiGetDriverInfoDetail
#define SetupInstallFromInfSection
#define SetupDiGetDeviceInstallParams
#define SetupDiGetDeviceRegistryProperty
#define SetupDiSetDeviceInstallParams
_In_opt_ PSP_DEVINFO_DATA DeviceInfoData
#define ERROR_DI_DO_DEFAULT
#define SetupDiGetSelectedDriver
#define DIF_INSTALLDEVICE
#define DI_DONOTCALLCONFIGMG
PULONG MinorVersion OPTIONAL
CHAR Description[LINE_LEN]
CHAR InfFileName[MAX_PATH]
CHAR SectionName[LINE_LEN]
VOID WINAPI SetupCloseInfFile(IN HINF InfHandle)
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
DWORD WINAPI GetLastError(void)
#define ERROR_GEN_FAILURE
DISPLAY_DEVICEA DISPLAY_DEVICE
#define HKEY_LOCAL_MACHINE