cfgmgr32

package
v0.31.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Configuration Manager return codes
	CR_SUCCESS = 0x00

	// Filter flags
	CM_GETIDLIST_FILTER_ENUMERATOR = 0x00000001
	CM_GETIDLIST_FILTER_PRESENT    = 0x00000100

	DEVPROP_TYPE_UINT32 uint32 = 0x00000007
)

Variables

View Source
var (
	// https://github.com/Infinidat/infi.devicemanager/blob/8be9ead6b04ff45c63d9e3bc70d82cceafb75c47/src/infi/devicemanager/setupapi/properties.py#L138C1-L143C34
	DEVPKEYDeviceBusNumber = &DEVPROPKEY{
		FmtID: ole.GUID{
			Data1: 0xa45c254e,
			Data2: 0xdf1c,
			Data3: 0x4efd,
			Data4: [8]byte{0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0},
		},
		PID: 23,
	}

	// https://github.com/Infinidat/infi.devicemanager/blob/8be9ead6b04ff45c63d9e3bc70d82cceafb75c47/src/infi/devicemanager/setupapi/properties.py#L187-L192
	DEVPKEYDeviceAddress = &DEVPROPKEY{
		FmtID: ole.GUID{
			Data1: 0xa45c254e,
			Data2: 0xdf1c,
			Data3: 0x4efd,
			Data4: [8]byte{0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0},
		},
		PID: 30,
	}
)

Functions

func CMGetDevNodeProperty

func CMGetDevNodeProperty(devInst *windows.Handle, propKey *DEVPROPKEY, propType *uint32, buf unsafe.Pointer, bufLen *uint32) error

func CMGetDeviceIDList

func CMGetDeviceIDList(filter *win32.LPWSTR, buf []uint16) error

func CMGetDeviceIDListSize

func CMGetDeviceIDListSize(filter *win32.LPWSTR, size *uint32) error

func CMLocateDevNode

func CMLocateDevNode(devInst **windows.Handle, deviceID []uint16) error

Types

type DEVPROPKEY

type DEVPROPKEY struct {
	FmtID ole.GUID
	PID   uint32
}

DEVPROPKEY represents a device property key (GUID + pid)

type Device

type Device struct {
	InstanceID     string
	BusNumber      win32.UINT
	DeviceNumber   win32.UINT
	FunctionNumber win32.UINT
}

func GetDevicesInstanceIDs

func GetDevicesInstanceIDs(deviceID string) ([]Device, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL