43 InstallParams.
cbSize =
sizeof(InstallParams);
48 DPRINT(
"SetupDiGetDeviceInstallParams() failed with error 0x%lx\n", rc);
58 DPRINT(
"SetupDiSetDeviceInstallParams() failed with error 0x%lx\n", rc);
67 DPRINT(
"SetupDiInstallDevice() failed with error 0x%lx\n", rc);
72 DriverInfoData.
cbSize =
sizeof(DriverInfoData);
77 DPRINT(
"SetupDiGetSelectedDriver() failed with error 0x%lx\n", rc);
81 DriverInfoDetailData.
cbSize =
sizeof(DriverInfoDetailData);
83 &DriverInfoData, &DriverInfoDetailData,
84 sizeof(DriverInfoDetailData),
NULL);
88 DPRINT(
"SetupDiGetDriverInfoDetail() failed with error 0x%lx\n", rc);
96 DPRINT(
"SetupOpenInfFile() failed with error 0x%lx\n", rc);
110 DPRINT(
"SetupDiGetActualSectionToInstall() failed with error 0x%lx\n", rc);
113 hr =
StringCbCat(SectionName,
sizeof(SectionName),
_T(
".SoftwareSettings"));
128 DPRINT(
"SetupDiOpenDevRegKey() failed with error 0x%lx\n", rc);
132 hDriverKey,
L"Settings",
139 NULL, &hSettingsKey, &disposition);
142 DPRINT(
"RegCreateKeyEx() failed with error 0x%lx\n", rc);
155 DPRINT(
"SetupInstallFromInfSection() failed with error 0x%lx\n", rc);
167 DPRINT(
"SetupDiGetDeviceRegistryProperty() failed with error 0x%lx\n", rc);
176 DPRINT(
"RegOpenKeyEx() failed with error 0x%lx\n", rc);
184 DPRINT(
"RegOpenKeyEx() failed with error 0x%lx\n", rc);
189 for (wIndex = 0; wIndex < 9999; wIndex++)
196 &hDeviceSubKey, &disposition);
199 DPRINT(
"RegCreateKeyEx() failed with error 0x%lx\n", rc);
209 DPRINT(
"RegCreateKeyEx() failed\n");
214 hDeviceSubKey =
NULL;
228 DPRINT(
"SetupInstallFromInfSection() failed with error 0x%lx\n", rc);
235 _T(
"Device Description"),
242 DPRINT(
"RegSetValueEx() failed with error 0x%lx\n", rc);
258 if (hSettingsKey !=
NULL)
262 if (hServiceKey !=
NULL)
264 if (hDeviceSubKey !=
NULL)
#define SetupInstallFromInfSection
#define SetupDiGetDeviceInstallParams
#define INVALID_HANDLE_VALUE
DWORD WINAPI GetLastError(VOID)
#define SetupDiGetDeviceRegistryProperty
#define SetupDiGetSelectedDriver
VOID WINAPI SetupCloseInfFile(IN HINF InfHandle)
CHAR SectionName[LINE_LEN]
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
LONG WINAPI RegCloseKey(HKEY hKey)
#define SetupDiGetActualSectionToInstall
#define DI_DONOTCALLCONFIGMG
BOOL WINAPI SetupDiInstallDevice(IN HDEVINFO DeviceInfoSet, IN OUT PSP_DEVINFO_DATA DeviceInfoData)
size_t __cdecl _tcslen(const _TCHAR *str)
#define REG_CREATED_NEW_KEY
#define DIF_INSTALLDEVICE
#define REG_OPTION_NON_VOLATILE
static HANDLE hServicesKey
#define SetupDiSetDeviceInstallParams
_In_opt_ PSP_DEVINFO_DATA DeviceInfoData
HKEY WINAPI SetupDiOpenDevRegKey(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, DWORD Scope, DWORD HwProfile, DWORD KeyType, REGSAM samDesired)
#define SetupDiGetDriverInfoDetail
CHAR Description[LINE_LEN]
#define ERROR_DI_DO_DEFAULT
char * cleanup(char *str)
#define ERROR_GEN_FAILURE
CHAR InfFileName[MAX_PATH]
#define KEY_CREATE_SUB_KEY
#define MAX_SERVICE_NAME_LEN
#define HKEY_LOCAL_MACHINE
#define KEY_ENUMERATE_SUB_KEYS
#define ERROR_INSUFFICIENT_BUFFER