24 switch (InstallFunction)
27 DPRINT1(
"Install function %u ignored\n", InstallFunction);
45 WCHAR szServiceName[256];
46 WCHAR szClassGUID[64];
54 DPRINT(
"CriticalDeviceCoInstaller(%lu %p %p %p)\n",
72 DPRINT1(
"Failed to open the driver key! (Error %lu)\n", dwError);
77 DPRINT(
"Failed to open the driver key! Postprocessing required!\n");
95 DPRINT1(
"Failed to read the MatchingDeviceId value! (Error %lu)\n", dwError);
100 DPRINT(
"Failed to read the MatchingDeviceId value! Postprocessing required!\n");
120 DPRINT1(
"Failed to read the ClassGUID! (Error %lu)\n", dwError);
125 DPRINT(
"Failed to read the ClassGUID! Postprocessing required!\n");
130 DPRINT(
"ClassGUID %S\n", szClassGUID);
138 (
PBYTE)szServiceName,
139 sizeof(szServiceName),
147 DPRINT1(
"Failed to read the Service name! (Error %lu)\n", dwError);
158 DPRINT(
"Failed to read the Service name! Postprocessing required!\n");
163 DPRINT(
"Service %S\n", szServiceName);
181 L"SYSTEM\\CurrentControlSet\\Control\\CriticalDeviceDatabase",
187 DPRINT1(
"RegOpenKeyExW failed (Error %lu)\n", dwError);
203 DPRINT1(
"RegCreateKeyExW failed (Error %lu)\n", dwError);
216 DPRINT1(
"RegSetValueExW failed (Error %lu)\n", dwError);
227 (
PBYTE)szServiceName,
231 DPRINT1(
"RegSetValueExW failed (Error %lu)\n", dwError);
237 if (hDeviceKey !=
NULL)
240 if (hDatabaseKey !=
NULL)
243 DPRINT(
"CriticalDeviceCoInstaller() done (Error %lu)\n", dwError);
259 switch (InstallFunction)
262 DPRINT(
"Install function %u ignored\n", InstallFunction);
279 switch (InstallFunction)
282 DPRINT1(
"Install function %u ignored\n", InstallFunction);
298 DPRINT(
"HdcClassInstaller()\n");
313 switch (InstallFunction)
316 DPRINT(
"Install function %u ignored\n", InstallFunction);
332 switch (InstallFunction)
335 DPRINT(
"Install function %u ignored\n", InstallFunction);
351 switch (InstallFunction)
354 DPRINT(
"Install function %u ignored\n", InstallFunction);
370 switch (InstallFunction)
373 DPRINT(
"Install function %u ignored\n", InstallFunction);
390 ULONG ulStatus, ulProblem;
391 DWORD dwBufferSize = 0;
392 PWSTR pszDeviceDescription;
395 DPRINT(
"StorageCoInstaller(%u %p %p %p)\n",
411 (
PBYTE)pszDeviceDescription,
412 (
wcslen(pszDeviceDescription) + 1) *
sizeof(
WCHAR));
439 if (dwBufferSize == 0)
444 if (pszDeviceDescription ==
NULL)
452 (
PBYTE)pszDeviceDescription,
474 DPRINT(
"TapeClassInstaller()\n");
489 DPRINT(
"VolumeClassInstaller()\n");
#define RegCloseKey(hKey)
#define DN_ROOT_ENUMERATED
CONFIGRET WINAPI CM_Get_DevNode_Status(_Out_ PULONG pulStatus, _Out_ PULONG pulProblemNumber, _In_ DEVINST dnDevInst, _In_ ULONG ulFlags)
static const WCHAR szDeviceId[]
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
BOOL WINAPI SetupDiGetDeviceRegistryPropertyW(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, DWORD Property, PDWORD PropertyRegDataType, PBYTE PropertyBuffer, DWORD PropertyBufferSize, PDWORD RequiredSize)
HKEY WINAPI SetupDiOpenDevRegKey(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, DWORD Scope, DWORD HwProfile, DWORD KeyType, REGSAM samDesired)
BOOL WINAPI SetupDiSetDeviceRegistryPropertyW(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, DWORD Property, const BYTE *PropertyBuffer, DWORD PropertyBufferSize)
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define ERROR_FILE_NOT_FOUND
#define REG_OPTION_NON_VOLATILE
#define ERROR_DI_POSTPROCESSING_REQUIRED
_In_opt_ PSP_DEVINFO_DATA DeviceInfoData
#define ERROR_DI_DO_DEFAULT
#define DIF_INSTALLDEVICE
#define SPDRP_FRIENDLYNAME
PULONG MinorVersion OPTIONAL
DWORD WINAPI ComputerClassInstaller(IN DI_FUNCTION InstallFunction, IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL)
DWORD WINAPI CriticalDeviceCoInstaller(IN DI_FUNCTION InstallFunction, IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN OUT PCOINSTALLER_CONTEXT_DATA Context)
DWORD WINAPI NtApmClassInstaller(IN DI_FUNCTION InstallFunction, IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL)
DWORD WINAPI TapeClassInstaller(IN DI_FUNCTION InstallFunction, IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL)
DWORD WINAPI DeviceBayClassInstaller(IN DI_FUNCTION InstallFunction, IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL)
DWORD WINAPI VolumeClassInstaller(IN DI_FUNCTION InstallFunction, IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL)
DWORD WINAPI KeyboardClassInstaller(IN DI_FUNCTION InstallFunction, IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL)
DWORD WINAPI EisaUpHalCoInstaller(IN DI_FUNCTION InstallFunction, IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN OUT PCOINSTALLER_CONTEXT_DATA Context)
DWORD WINAPI StorageCoInstaller(IN DI_FUNCTION InstallFunction, IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN OUT PCOINSTALLER_CONTEXT_DATA Context)
DWORD WINAPI MouseClassInstaller(IN DI_FUNCTION InstallFunction, IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL)
DWORD WINAPI HdcClassInstaller(IN DI_FUNCTION InstallFunction, IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL)
DWORD WINAPI ScsiClassInstaller(IN DI_FUNCTION InstallFunction, IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL)
DWORD WINAPI GetLastError(void)
#define HKEY_LOCAL_MACHINE