C# Класс LitDev.Engines.Win32Usb

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
NullHandle System.IntPtr

Защищенные свойства (Protected)

Свойство Тип Описание
InvalidHandleValue System.IntPtr

Открытые методы

Метод Описание
RegisterForUsbEvents ( IntPtr hWnd, System.Guid gClass ) : IntPtr

Registers a window to receive windows messages when a device is inserted/removed. Need to call this from a form when its handle has been created, not in the form constructor. Use form's OnHandleCreated override.

UnregisterForUsbEvents ( IntPtr hHandle ) : bool

Unregisters notifications. Can be used in form dispose

Приватные методы

Метод Описание
CloseHandle ( IntPtr hFile ) : int
CreateFile ( [ strName, uint nAccess, uint nShareMode, IntPtr lpSecurity, uint nCreationFlags, uint nAttributes, IntPtr lpTemplate ) : IntPtr
HidD_FreePreparsedData ( IntPtr &pData ) : System.Boolean
HidD_GetHidGuid ( System.Guid &gHid ) : void
HidD_GetPreparsedData ( IntPtr hFile, IntPtr &lpData ) : System.Boolean
HidP_GetCaps ( IntPtr lpData, HidCaps &oCaps ) : int
RegisterDeviceNotification ( IntPtr hwnd, DeviceBroadcastInterface oInterface, uint nFlags ) : IntPtr
SetupDiDestroyDeviceInfoList ( IntPtr lpInfoSet ) : int
SetupDiEnumDeviceInterfaces ( IntPtr lpDeviceInfoSet, IntPtr pDeviceInfoData, System.Guid &gClass, uint nIndex, DeviceInterfaceData &oInterfaceData ) : bool
SetupDiGetClassDevs ( System.Guid &gClass, [ strEnumerator, IntPtr hParent, uint nFlags ) : IntPtr
SetupDiGetDeviceInterfaceDetail ( IntPtr lpDeviceInfoSet, DeviceInterfaceData &oInterfaceData, DeviceInterfaceDetailData &oDetailData, uint nDeviceInterfaceDetailDataSize, uint &nRequiredSize, DeviceInfoData &lpDeviceInfoData ) : bool
SetupDiGetDeviceInterfaceDetail ( IntPtr lpDeviceInfoSet, DeviceInterfaceData &oInterfaceData, IntPtr lpDeviceInterfaceDetailData, uint nDeviceInterfaceDetailDataSize, uint &nRequiredSize, DeviceInfoData &lpDeviceInfoData ) : bool
SetupDiGetDeviceRegistryProperty ( IntPtr DeviceInfoSet, DeviceInterfaceData &DeviceInfoData, uint Property, UInt32 &PropertyRegDataType, byte PropertyBuffer, uint PropertyBufferSize, UInt32 &RequiredSize ) : bool
UnregisterDeviceNotification ( IntPtr hHandle ) : bool

Описание методов

RegisterForUsbEvents() публичный статический Метод

Registers a window to receive windows messages when a device is inserted/removed. Need to call this from a form when its handle has been created, not in the form constructor. Use form's OnHandleCreated override.
public static RegisterForUsbEvents ( IntPtr hWnd, System.Guid gClass ) : IntPtr
hWnd System.IntPtr Handle to window that will receive messages
gClass System.Guid Class of devices to get messages for
Результат System.IntPtr

UnregisterForUsbEvents() публичный статический Метод

Unregisters notifications. Can be used in form dispose
public static UnregisterForUsbEvents ( IntPtr hHandle ) : bool
hHandle System.IntPtr Handle returned from RegisterForUSBEvents
Результат bool

Описание свойств

InvalidHandleValue защищенное статическое свойство

Simple representation of the handle returned when CreateFile fails.
protected static IntPtr,System InvalidHandleValue
Результат System.IntPtr

NullHandle публичное статическое свойство

Simple representation of a null handle : a closed stream will get this handle. Note it is public for comparison by higher level classes.
public static IntPtr,System NullHandle
Результат System.IntPtr