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);
147 HDEVINFO m_DeviceInfoSet;
148 PSP_DEVINFO_DATA m_DeviceInfoData;
Base abstract template class to support generic object handle keeping.
Definition: Common.h:580
HDEVINFO handle_type
Datatype of the object handle this template class handles.
Definition: Common.h:585
void attach(_In_opt_ handle_type h) noexcept
Sets a new object handle for the class.
Definition: Common.h:794
handle_type m_h
Object handle.
Definition: Common.h:833
HDEVINFO wrapper class.
Definition: SetupAPI.h:24
virtual ~setup_device_info_list()
Frees the device information set.
Definition: SetupAPI.h:33
bool create(_In_opt_ const GUID *ClassGuid, _In_opt_ PCTSTR Enumerator, _In_opt_ HWND hwndParent, _In_ DWORD Flags, _In_opt_ HDEVINFO DeviceInfoSet, _In_opt_ PCTSTR MachineName, _Reserved_ PVOID Reserved) noexcept
Creates a device information set that contains requested device information elements for a local or a...
Definition: SetupAPI.h:70
void free_internal() noexcept override
Frees the device information set.
Definition: SetupAPI.h:94
bool create(_In_opt_ const GUID *ClassGuid, _In_opt_ 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(_In_ HDEVINFO DeviceInfoSet, _Inout_opt_ PSP_DEVINFO_DATA DeviceInfoData, _In_ 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 m_result
Did building succeed?
Definition: SetupAPI.h:150
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:138
static const HDEVINFO invalid
Invalid handle value.
Definition: Common.h:590