setupapi: Introduce DevInfo methods for cleaner code

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman
2019-02-05 08:45:44 +01:00
committed by Jason A. Donenfeld
parent 35f72239ac
commit e7ffce0d21
3 changed files with 74 additions and 19 deletions

View File

@@ -31,11 +31,6 @@ type HSPFILEQ uintptr
// DevInfo holds reference to device information set
type DevInfo windows.Handle
// Close function deletes a device information set and frees all associated memory.
func (h DevInfo) Close() error {
return SetupDiDestroyDeviceInfoList(h)
}
// SP_DEVINFO_DATA is a device information structure (references a device instance that is a member of a device information set)
type SP_DEVINFO_DATA struct {
Size uint32