48 __declspec(deprecated(
"Use SetupDiCreateDeviceInfoList"))
50 _In_opt_ const GUID * ClassGuid,
51 _In_opt_ HWND hwndParent) noexcept
53 handle_type h = SetupDiCreateDeviceInfoList(ClassGuid, hwndParent);
73 _In_opt_ const GUID * ClassGuid,
74 _In_opt_ PCTSTR Enumerator,
75 _In_opt_ HWND hwndParent,
77 _In_opt_ HDEVINFO DeviceInfoSet,
78 _In_opt_ PCTSTR MachineName,
79 _Reserved_ PVOID Reserved) noexcept
81 handle_type h = SetupDiGetClassDevsEx(ClassGuid, Enumerator, hwndParent, Flags, DeviceInfoSet, MachineName, Reserved);
98 SetupDiDestroyDeviceInfoList(
m_h);
117 _In_ HDEVINFO DeviceInfoSet,
118 _Inout_opt_ PSP_DEVINFO_DATA DeviceInfoData,
119 _In_ DWORD DriverType) noexcept :
120 m_DeviceInfoSet (DeviceInfoSet),
121 m_DeviceInfoData(DeviceInfoData),
122 m_DriverType (DriverType)
124 m_result = SetupDiBuildDriverInfoList(m_DeviceInfoSet, m_DeviceInfoData, m_DriverType);
135 SetupDiDestroyDriverInfoList(m_DeviceInfoSet, m_DeviceInfoData, m_DriverType);
150 HDEVINFO m_DeviceInfoSet;
151 PSP_DEVINFO_DATA m_DeviceInfoData;
Base abstract template class to support generic object handle keeping.
Definition: Common.h:603
HDEVINFO handle_type
Datatype of the object handle this template class handles.
Definition: Common.h:608
handle_type m_h
Object handle.
Definition: Common.h:854
void attach(handle_type h) noexcept
Sets a new object handle for the class.
Definition: Common.h:817
HDEVINFO wrapper class.
Definition: SetupAPI.h:24
virtual ~setup_device_info_list()
Frees the device information set.
Definition: SetupAPI.h:33
__declspec(deprecated("Use SetupDiCreateDeviceInfoList")) bool create(const GUID *ClassGuid
Creates an empty device information set and optionally associates the set with a device setup class a...
void free_internal() noexcept override
Frees the device information set.
Definition: SetupAPI.h:96
__declspec(deprecated("Use SetupDiGetClassDevsEx")) bool create(const GUID *ClassGuid
Creates a device information set that contains requested device information elements for a local or a...
Builds a list of drivers in constructor and deletes it in destructor.
Definition: SetupAPI.h:106
setup_driver_info_list_builder(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, DWORD DriverType) noexcept
Construct the builder and builds a list of drivers that is associated with a specific device or with ...
Definition: SetupAPI.h:116
virtual ~setup_driver_info_list_builder()
Deletes a driver list and destructs the builder.
Definition: SetupAPI.h:132
BOOL status() const noexcept
Return result of SetupDiBuildDriverInfoList() call.
Definition: SetupAPI.h:143
#define WINSTD_NONCOPYABLE(C)
Declares a class as non-copyable.
Definition: Common.h:52
#define WINSTD_NONMOVABLE(C)
Declares a class as non-movable.
Definition: Common.h:60
#define WINSTD_HANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:161
static const HDEVINFO invalid
Invalid handle value.
Definition: Common.h:613