10#define WIN32_NO_STATUS
38 DPRINT(
"InstallCompositeBattery(%p %p %p)\n",
52 if (NewDeviceInfoData ==
NULL)
60 L"Root\\COMPOSITE_BATTERY\\0000",
61 &GUID_DEVCLASS_SYSTEM,
74 DPRINT1(
"SetupDiCreateDeviceInfoW() failed (Error %lu 0x%08lx)\n", dwError, dwError);
86 DPRINT1(
"SetupDiRegisterDeviceInfo() failed (Error %lu 0x%08lx)\n", dwError, dwError);
90 bDeviceRegistered =
TRUE;
102 DPRINT1(
"SetupDiSetDeviceRegistryPropertyW() failed (Error %lu 0x%08lx)\n", dwError, dwError);
111 DPRINT1(
"SetupDiBuildDriverInfoList() failed (Error %lu 0x%08lx)\n", dwError, dwError);
115 bHaveDriverInfoList =
TRUE;
125 DPRINT1(
"SetupDiEnumDriverInfo() failed (Error %lu 0x%08lx)\n", dwError, dwError);
134 DPRINT1(
"SetupDiSetSelectedDriver() failed (Error %lu 0x%08lx)\n", dwError, dwError);
142 DPRINT1(
"SetupDiInstallDevice() failed (Error %lu 0x%08lx)\n", dwError, dwError);
149 if (bHaveDriverInfoList)
154 if (bDeviceRegistered)
158 if (NewDeviceInfoData !=
NULL)
178 DPRINT(
"BatteryClassInstall(%u %p %p)\n",
214 switch (InstallFunction)
217 DPRINT(
"Install function %u ignored\n", InstallFunction);
DWORD WINAPI BatteryClassInstall(_In_ DI_FUNCTION InstallFunction, _In_ HDEVINFO DeviceInfoSet, _In_opt_ PSP_DEVINFO_DATA DeviceInfoData)
static DWORD InstallCompositeBattery(_In_ HDEVINFO DeviceInfoSet, _In_opt_ PSP_DEVINFO_DATA DeviceInfoData, _In_ PSP_DEVINSTALL_PARAMS_W DeviceInstallParams)
DWORD WINAPI BatteryClassCoInstaller(IN DI_FUNCTION InstallFunction, IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN OUT PCOINSTALLER_CONTEXT_DATA Context)
BOOL WINAPI DllMain(_In_ HINSTANCE hinstDll, _In_ DWORD dwReason, _In_ LPVOID reserved)
static const WCHAR szDeviceId[]
#define DLL_PROCESS_ATTACH
#define DLL_PROCESS_DETACH
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
BOOL WINAPI SetupDiGetDeviceInstallParamsW(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, OUT PSP_DEVINSTALL_PARAMS_W DeviceInstallParams)
BOOL WINAPI SetupDiRegisterDeviceInfo(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, DWORD Flags, PSP_DETSIG_CMPPROC CompareProc, PVOID CompareContext, PSP_DEVINFO_DATA DupDeviceInfoData)
BOOL WINAPI SetupDiCreateDeviceInfoW(HDEVINFO DeviceInfoSet, PCWSTR DeviceName, CONST GUID *ClassGuid, PCWSTR DeviceDescription, HWND hwndParent, DWORD CreationFlags, PSP_DEVINFO_DATA DeviceInfoData)
BOOL WINAPI SetupDiDeleteDeviceInfo(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData)
BOOL WINAPI SetupDiInstallDevice(IN HDEVINFO DeviceInfoSet, IN OUT PSP_DEVINFO_DATA DeviceInfoData)
BOOL WINAPI SetupDiSetDeviceRegistryPropertyW(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, DWORD Property, const BYTE *PropertyBuffer, DWORD PropertyBufferSize)
BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo)
HDEVINFO WINAPI SetupDiCreateDeviceInfoList(const GUID *ClassGuid, HWND hwndParent)
BOOL WINAPI SetupDiBuildDriverInfoList(IN HDEVINFO DeviceInfoSet, IN OUT PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN DWORD DriverType)
BOOL WINAPI SetupDiDestroyDriverInfoList(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN DWORD DriverType)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define ERROR_DEVINST_ALREADY_EXISTS
SP_DRVINFO_DATA_V2 SP_DRVINFO_DATA
_In_opt_ PSP_DEVINFO_DATA DeviceInfoData
#define ERROR_DI_DO_DEFAULT
#define SetupDiSetSelectedDriver
#define DIF_INSTALLDEVICE
#define SetupDiEnumDriverInfo
struct _SP_DEVINFO_DATA SP_DEVINFO_DATA
#define SPDIT_COMPATDRIVER
PULONG MinorVersion OPTIONAL
DWORD WINAPI GetLastError(void)