devices

package
v0.0.0-...-f2919f2 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DevHandle

type DevHandle struct {
	*overlapped.Handle
	// contains filtered or unexported fields
}

DevHandle wraps a device interface for easier I/O

func (DevHandle) WindowsHandle

func (d DevHandle) WindowsHandle() windows.Handle

WindowsHandle returns windows.Handle that is being wrapped by this DevHandle

type DevNode

type DevNode uintptr

DevNode is a pointer to a specific device node in the device tree https://docs.microsoft.com/en-us/windows-hardware/drivers/gettingstarted/device-nodes-and-device-stacks

func (DevNode) Parent

func (d DevNode) Parent() (parent DevNode, err error)

Parent traverses the tree to return the parent node of this node.

func (DevNode) Property

func (d DevNode) Property(propertyKey *windows.DEVPROPKEY) (v interface{}, err error)

Property returns specific property of the device interface. Returned type varies depending on the property key in question.

type DeviceInstanceId

type DeviceInstanceId []uint16

DeviceInstanceId is a system-supplied device identification string that uniquely identifies a device in the system

type DeviceInterfaceDetailData

type DeviceInterfaceDetailData []uint16

DeviceInterfaceDetailData holds the necessary data to identify single device intertface. https://docs.microsoft.com/en-us/windows-hardware/drivers/wdf/using-device-interfaces

func Interfaces

func Interfaces(devInterfaceGuid windows.GUID) (interfaces []DeviceInterfaceDetailData, err error)

Interfaces fetches all device interfaces that match the given GUID

func (DeviceInterfaceDetailData) DeviceInstanceId

func (dev DeviceInterfaceDetailData) DeviceInstanceId() (deviceId DeviceInstanceId, err error)

DeviceInstanceId returns the device instance ID of this device interface

func (DeviceInterfaceDetailData) Handle

func (dev DeviceInterfaceDetailData) Handle() (h DevHandle, err error)

Handle opens the device interface and returns a handle that can be used for I/O

func (DeviceInterfaceDetailData) Property

func (dev DeviceInterfaceDetailData) Property(propertyKey *windows.DEVPROPKEY) (v interface{}, err error)

Property returns specific property of the device interface. Returned type varies depending on the property key in question.

Directories

Path Synopsis
hid

Jump to

Keyboard shortcuts

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