49 _In_opt_
const GUID * ClassGuid,
50 _In_opt_ HWND hwndParent)
noexcept
52 handle_type h = SetupDiCreateDeviceInfoList(ClassGuid, hwndParent);
71 _In_opt_
const GUID * ClassGuid,
72 _In_opt_ PCTSTR Enumerator,
73 _In_opt_ HWND hwndParent,
75 _In_opt_ HDEVINFO DeviceInfoSet,
76 _In_opt_ PCTSTR MachineName,
77 _Reserved_ PVOID Reserved)
noexcept
79 handle_type h = SetupDiGetClassDevsEx(ClassGuid, Enumerator, hwndParent, Flags, DeviceInfoSet, MachineName, Reserved);
96 SetupDiDestroyDeviceInfoList(
m_h);
115 _In_ HDEVINFO DeviceInfoSet,
116 _Inout_opt_ PSP_DEVINFO_DATA DeviceInfoData,
117 _In_ DWORD DriverType) noexcept :
118 m_DeviceInfoSet (DeviceInfoSet),
119 m_DeviceInfoData(DeviceInfoData),
120 m_DriverType (DriverType)
122 m_result = SetupDiBuildDriverInfoList(m_DeviceInfoSet, m_DeviceInfoData, m_DriverType);
133 SetupDiDestroyDriverInfoList(m_DeviceInfoSet, m_DeviceInfoData, m_DriverType);
148 HDEVINFO m_DeviceInfoSet;
149 PSP_DEVINFO_DATA m_DeviceInfoData;
Base abstract template class to support generic object handle keeping.
Definition: Common.h:604
HDEVINFO handle_type
Datatype of the object handle this template class handles.
Definition: Common.h:609
void attach(1 handle_type h) noexcept
Sets a new object handle for the class.
Definition: Common.h:818
handle_type m_h
Object handle.
Definition: Common.h:855
HDEVINFO wrapper class.
Definition: SetupAPI.h:24
virtual ~setup_device_info_list()
Frees the device information set.
Definition: SetupAPI.h:33
void free_internal() noexcept override
Frees the device information set.
Definition: SetupAPI.h:94
bool create(1 const GUID *ClassGuid, 1 PCTSTR Enumerator, 1 HWND hwndParent, 1 DWORD Flags, 1 HDEVINFO DeviceInfoSet, 1 PCTSTR MachineName, 1 PVOID Reserved) noexcept
Creates a device information set that contains requested device information elements for a local or a...
Definition: SetupAPI.h:70
bool create(1 const GUID *ClassGuid, 1 HWND hwndParent) noexcept
Creates an empty device information set and optionally associates the set with a device setup class a...
Definition: SetupAPI.h:48
Builds a list of drivers in constructor and deletes it in destructor.
Definition: SetupAPI.h:104
setup_driver_info_list_builder(1 HDEVINFO DeviceInfoSet, 1 PSP_DEVINFO_DATA DeviceInfoData, 1 DWORD DriverType) noexcept
Construct the builder and builds a list of drivers that is associated with a specific device or with ...
Definition: SetupAPI.h:114
virtual ~setup_driver_info_list_builder()
Deletes a driver list and destructs the builder.
Definition: SetupAPI.h:130
BOOL status() const noexcept
Return result of SetupDiBuildDriverInfoList() call.
Definition: SetupAPI.h:141
#define WINSTD_NONCOPYABLE(C)
Declares a class as non-copyable.
Definition: Common.h:53
#define WINSTD_NONMOVABLE(C)
Declares a class as non-movable.
Definition: Common.h:61
#define WINSTD_HANDLE_IMPL(C, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition: Common.h:162
static const HDEVINFO invalid
Invalid handle value.
Definition: Common.h:614