C# Класс libusbK.UsbK

Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
driverAPI KUSB_DRIVER_API
handle KUSB_HANDLE

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

Метод Описание
AbortPipe ( byte PipeID ) : bool
ClaimInterface ( byte NumberOrIndex, bool IsIndex ) : bool
Clone ( KUSB_HANDLE &DstInterfaceHandle ) : bool
ControlTransfer ( WINUSB_SETUP_PACKET SetupPacket, Array Buffer, uint BufferLength, uint &LengthTransferred, IntPtr Overlapped ) : bool
ControlTransfer ( WINUSB_SETUP_PACKET SetupPacket, Array Buffer, uint BufferLength, uint &LengthTransferred, KOVL_HANDLE Overlapped ) : bool
ControlTransfer ( WINUSB_SETUP_PACKET SetupPacket, IntPtr Buffer, uint BufferLength, uint &LengthTransferred, IntPtr Overlapped ) : bool
ControlTransfer ( WINUSB_SETUP_PACKET SetupPacket, IntPtr Buffer, uint BufferLength, uint &LengthTransferred, KOVL_HANDLE Overlapped ) : bool
FlushPipe ( byte PipeID ) : bool
Free ( ) : bool
GetAltInterface ( byte NumberOrIndex, bool IsIndex, byte &AltSettingNumber ) : bool
GetAssociatedInterface ( byte AssociatedInterfaceIndex, KUSB_HANDLE &AssociatedInterfaceHandle ) : bool
GetConfiguration ( byte &ConfigurationNumber ) : bool
GetCurrentAlternateSetting ( byte &AltSettingNumber ) : bool
GetCurrentFrameNumber ( uint &FrameNumber ) : bool
GetDescriptor ( byte DescriptorType, byte Index, ushort LanguageID, Array Buffer, uint BufferLength, uint &LengthTransferred ) : bool
GetDescriptor ( byte DescriptorType, byte Index, ushort LanguageID, IntPtr Buffer, uint BufferLength, uint &LengthTransferred ) : bool
GetOverlappedResult ( IntPtr Overlapped, uint &lpNumberOfBytesTransferred, bool bWait ) : bool
GetOverlappedResult ( KOVL_HANDLE Overlapped, uint &lpNumberOfBytesTransferred, bool bWait ) : bool
GetPipePolicy ( byte PipeID, uint PolicyType, uint &ValueLength, Array Value ) : bool
GetPipePolicy ( byte PipeID, uint PolicyType, uint &ValueLength, IntPtr Value ) : bool
GetPowerPolicy ( uint PolicyType, uint &ValueLength, Array Value ) : bool
GetPowerPolicy ( uint PolicyType, uint &ValueLength, IntPtr Value ) : bool
GetProperty ( KUSB_PROPERTY PropertyType, uint &PropertySize, Array Value ) : bool
GetProperty ( KUSB_PROPERTY PropertyType, uint &PropertySize, IntPtr Value ) : bool
IsoReadPipe ( byte PipeID, Array Buffer, uint BufferLength, IntPtr Overlapped, KISO_CONTEXT IsoContext ) : bool
IsoReadPipe ( byte PipeID, Array Buffer, uint BufferLength, KOVL_HANDLE Overlapped, KISO_CONTEXT IsoContext ) : bool
IsoReadPipe ( byte PipeID, IntPtr Buffer, uint BufferLength, IntPtr Overlapped, KISO_CONTEXT IsoContext ) : bool
IsoReadPipe ( byte PipeID, IntPtr Buffer, uint BufferLength, KOVL_HANDLE Overlapped, KISO_CONTEXT IsoContext ) : bool
IsoWritePipe ( byte PipeID, Array Buffer, uint BufferLength, IntPtr Overlapped, KISO_CONTEXT IsoContext ) : bool
IsoWritePipe ( byte PipeID, Array Buffer, uint BufferLength, KOVL_HANDLE Overlapped, KISO_CONTEXT IsoContext ) : bool
IsoWritePipe ( byte PipeID, IntPtr Buffer, uint BufferLength, IntPtr Overlapped, KISO_CONTEXT IsoContext ) : bool
IsoWritePipe ( byte PipeID, IntPtr Buffer, uint BufferLength, KOVL_HANDLE Overlapped, KISO_CONTEXT IsoContext ) : bool
QueryDeviceInformation ( uint InformationType, uint &BufferLength, IntPtr Buffer ) : bool
QueryInterfaceSettings ( byte AltSettingNumber, USB_INTERFACE_DESCRIPTOR &UsbAltInterfaceDescriptor ) : bool
QueryPipe ( byte AltSettingNumber, byte PipeIndex, WINUSB_PIPE_INFORMATION &PipeInformation ) : bool
ReadPipe ( byte PipeID, Array Buffer, uint BufferLength, uint &LengthTransferred, IntPtr Overlapped ) : bool
ReadPipe ( byte PipeID, Array Buffer, uint BufferLength, uint &LengthTransferred, KOVL_HANDLE Overlapped ) : bool
ReadPipe ( byte PipeID, IntPtr Buffer, uint BufferLength, uint &LengthTransferred, IntPtr Overlapped ) : bool
ReadPipe ( byte PipeID, IntPtr Buffer, uint BufferLength, uint &LengthTransferred, KOVL_HANDLE Overlapped ) : bool
ReleaseInterface ( byte NumberOrIndex, bool IsIndex ) : bool
ResetDevice ( ) : bool
ResetPipe ( byte PipeID ) : bool
SelectInterface ( byte NumberOrIndex, bool IsIndex ) : bool
SetAltInterface ( byte NumberOrIndex, bool IsIndex, byte AltSettingNumber ) : bool
SetConfiguration ( byte ConfigurationNumber ) : bool
SetCurrentAlternateSetting ( byte AltSettingNumber ) : bool
SetPipePolicy ( byte PipeID, uint PolicyType, uint ValueLength, Array Value ) : bool
SetPipePolicy ( byte PipeID, uint PolicyType, uint ValueLength, IntPtr Value ) : bool
SetPowerPolicy ( uint PolicyType, uint ValueLength, Array Value ) : bool
SetPowerPolicy ( uint PolicyType, uint ValueLength, IntPtr Value ) : bool
UsbK ( IntPtr DeviceHandle, KUSB_DRVID driverID ) : System
UsbK ( KLST_DEVINFO_HANDLE DevInfo ) : System
WritePipe ( byte PipeID, Array Buffer, uint BufferLength, uint &LengthTransferred, IntPtr Overlapped ) : bool
WritePipe ( byte PipeID, Array Buffer, uint BufferLength, uint &LengthTransferred, KOVL_HANDLE Overlapped ) : bool
WritePipe ( byte PipeID, IntPtr Buffer, uint BufferLength, uint &LengthTransferred, IntPtr Overlapped ) : bool
WritePipe ( byte PipeID, IntPtr Buffer, uint BufferLength, uint &LengthTransferred, KOVL_HANDLE Overlapped ) : bool

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

AbortPipe() публичный Метод

public AbortPipe ( byte PipeID ) : bool
PipeID byte
Результат bool

ClaimInterface() публичный Метод

public ClaimInterface ( byte NumberOrIndex, bool IsIndex ) : bool
NumberOrIndex byte
IsIndex bool
Результат bool

Clone() публичный Метод

public Clone ( KUSB_HANDLE &DstInterfaceHandle ) : bool
DstInterfaceHandle KUSB_HANDLE
Результат bool

ControlTransfer() публичный Метод

public ControlTransfer ( WINUSB_SETUP_PACKET SetupPacket, Array Buffer, uint BufferLength, uint &LengthTransferred, IntPtr Overlapped ) : bool
SetupPacket WINUSB_SETUP_PACKET
Buffer System.Array
BufferLength uint
LengthTransferred uint
Overlapped System.IntPtr
Результат bool

ControlTransfer() публичный Метод

public ControlTransfer ( WINUSB_SETUP_PACKET SetupPacket, Array Buffer, uint BufferLength, uint &LengthTransferred, KOVL_HANDLE Overlapped ) : bool
SetupPacket WINUSB_SETUP_PACKET
Buffer System.Array
BufferLength uint
LengthTransferred uint
Overlapped KOVL_HANDLE
Результат bool

ControlTransfer() публичный Метод

public ControlTransfer ( WINUSB_SETUP_PACKET SetupPacket, IntPtr Buffer, uint BufferLength, uint &LengthTransferred, IntPtr Overlapped ) : bool
SetupPacket WINUSB_SETUP_PACKET
Buffer System.IntPtr
BufferLength uint
LengthTransferred uint
Overlapped System.IntPtr
Результат bool

ControlTransfer() публичный Метод

public ControlTransfer ( WINUSB_SETUP_PACKET SetupPacket, IntPtr Buffer, uint BufferLength, uint &LengthTransferred, KOVL_HANDLE Overlapped ) : bool
SetupPacket WINUSB_SETUP_PACKET
Buffer System.IntPtr
BufferLength uint
LengthTransferred uint
Overlapped KOVL_HANDLE
Результат bool

FlushPipe() публичный Метод

public FlushPipe ( byte PipeID ) : bool
PipeID byte
Результат bool

Free() публичный Метод

public Free ( ) : bool
Результат bool

GetAltInterface() публичный Метод

public GetAltInterface ( byte NumberOrIndex, bool IsIndex, byte &AltSettingNumber ) : bool
NumberOrIndex byte
IsIndex bool
AltSettingNumber byte
Результат bool

GetAssociatedInterface() публичный Метод

public GetAssociatedInterface ( byte AssociatedInterfaceIndex, KUSB_HANDLE &AssociatedInterfaceHandle ) : bool
AssociatedInterfaceIndex byte
AssociatedInterfaceHandle KUSB_HANDLE
Результат bool

GetConfiguration() публичный Метод

public GetConfiguration ( byte &ConfigurationNumber ) : bool
ConfigurationNumber byte
Результат bool

GetCurrentAlternateSetting() публичный Метод

public GetCurrentAlternateSetting ( byte &AltSettingNumber ) : bool
AltSettingNumber byte
Результат bool

GetCurrentFrameNumber() публичный Метод

public GetCurrentFrameNumber ( uint &FrameNumber ) : bool
FrameNumber uint
Результат bool

GetDescriptor() публичный Метод

public GetDescriptor ( byte DescriptorType, byte Index, ushort LanguageID, Array Buffer, uint BufferLength, uint &LengthTransferred ) : bool
DescriptorType byte
Index byte
LanguageID ushort
Buffer System.Array
BufferLength uint
LengthTransferred uint
Результат bool

GetDescriptor() публичный Метод

public GetDescriptor ( byte DescriptorType, byte Index, ushort LanguageID, IntPtr Buffer, uint BufferLength, uint &LengthTransferred ) : bool
DescriptorType byte
Index byte
LanguageID ushort
Buffer System.IntPtr
BufferLength uint
LengthTransferred uint
Результат bool

GetOverlappedResult() публичный Метод

public GetOverlappedResult ( IntPtr Overlapped, uint &lpNumberOfBytesTransferred, bool bWait ) : bool
Overlapped System.IntPtr
lpNumberOfBytesTransferred uint
bWait bool
Результат bool

GetOverlappedResult() публичный Метод

public GetOverlappedResult ( KOVL_HANDLE Overlapped, uint &lpNumberOfBytesTransferred, bool bWait ) : bool
Overlapped KOVL_HANDLE
lpNumberOfBytesTransferred uint
bWait bool
Результат bool

GetPipePolicy() публичный Метод

public GetPipePolicy ( byte PipeID, uint PolicyType, uint &ValueLength, Array Value ) : bool
PipeID byte
PolicyType uint
ValueLength uint
Value System.Array
Результат bool

GetPipePolicy() публичный Метод

public GetPipePolicy ( byte PipeID, uint PolicyType, uint &ValueLength, IntPtr Value ) : bool
PipeID byte
PolicyType uint
ValueLength uint
Value System.IntPtr
Результат bool

GetPowerPolicy() публичный Метод

public GetPowerPolicy ( uint PolicyType, uint &ValueLength, Array Value ) : bool
PolicyType uint
ValueLength uint
Value System.Array
Результат bool

GetPowerPolicy() публичный Метод

public GetPowerPolicy ( uint PolicyType, uint &ValueLength, IntPtr Value ) : bool
PolicyType uint
ValueLength uint
Value System.IntPtr
Результат bool

GetProperty() публичный Метод

public GetProperty ( KUSB_PROPERTY PropertyType, uint &PropertySize, Array Value ) : bool
PropertyType KUSB_PROPERTY
PropertySize uint
Value System.Array
Результат bool

GetProperty() публичный Метод

public GetProperty ( KUSB_PROPERTY PropertyType, uint &PropertySize, IntPtr Value ) : bool
PropertyType KUSB_PROPERTY
PropertySize uint
Value System.IntPtr
Результат bool

IsoReadPipe() публичный Метод

public IsoReadPipe ( byte PipeID, Array Buffer, uint BufferLength, IntPtr Overlapped, KISO_CONTEXT IsoContext ) : bool
PipeID byte
Buffer System.Array
BufferLength uint
Overlapped System.IntPtr
IsoContext KISO_CONTEXT
Результат bool

IsoReadPipe() публичный Метод

public IsoReadPipe ( byte PipeID, Array Buffer, uint BufferLength, KOVL_HANDLE Overlapped, KISO_CONTEXT IsoContext ) : bool
PipeID byte
Buffer System.Array
BufferLength uint
Overlapped KOVL_HANDLE
IsoContext KISO_CONTEXT
Результат bool

IsoReadPipe() публичный Метод

public IsoReadPipe ( byte PipeID, IntPtr Buffer, uint BufferLength, IntPtr Overlapped, KISO_CONTEXT IsoContext ) : bool
PipeID byte
Buffer System.IntPtr
BufferLength uint
Overlapped System.IntPtr
IsoContext KISO_CONTEXT
Результат bool

IsoReadPipe() публичный Метод

public IsoReadPipe ( byte PipeID, IntPtr Buffer, uint BufferLength, KOVL_HANDLE Overlapped, KISO_CONTEXT IsoContext ) : bool
PipeID byte
Buffer System.IntPtr
BufferLength uint
Overlapped KOVL_HANDLE
IsoContext KISO_CONTEXT
Результат bool

IsoWritePipe() публичный Метод

public IsoWritePipe ( byte PipeID, Array Buffer, uint BufferLength, IntPtr Overlapped, KISO_CONTEXT IsoContext ) : bool
PipeID byte
Buffer System.Array
BufferLength uint
Overlapped System.IntPtr
IsoContext KISO_CONTEXT
Результат bool

IsoWritePipe() публичный Метод

public IsoWritePipe ( byte PipeID, Array Buffer, uint BufferLength, KOVL_HANDLE Overlapped, KISO_CONTEXT IsoContext ) : bool
PipeID byte
Buffer System.Array
BufferLength uint
Overlapped KOVL_HANDLE
IsoContext KISO_CONTEXT
Результат bool

IsoWritePipe() публичный Метод

public IsoWritePipe ( byte PipeID, IntPtr Buffer, uint BufferLength, IntPtr Overlapped, KISO_CONTEXT IsoContext ) : bool
PipeID byte
Buffer System.IntPtr
BufferLength uint
Overlapped System.IntPtr
IsoContext KISO_CONTEXT
Результат bool

IsoWritePipe() публичный Метод

public IsoWritePipe ( byte PipeID, IntPtr Buffer, uint BufferLength, KOVL_HANDLE Overlapped, KISO_CONTEXT IsoContext ) : bool
PipeID byte
Buffer System.IntPtr
BufferLength uint
Overlapped KOVL_HANDLE
IsoContext KISO_CONTEXT
Результат bool

QueryDeviceInformation() публичный Метод

public QueryDeviceInformation ( uint InformationType, uint &BufferLength, IntPtr Buffer ) : bool
InformationType uint
BufferLength uint
Buffer System.IntPtr
Результат bool

QueryInterfaceSettings() публичный Метод

public QueryInterfaceSettings ( byte AltSettingNumber, USB_INTERFACE_DESCRIPTOR &UsbAltInterfaceDescriptor ) : bool
AltSettingNumber byte
UsbAltInterfaceDescriptor USB_INTERFACE_DESCRIPTOR
Результат bool

QueryPipe() публичный Метод

public QueryPipe ( byte AltSettingNumber, byte PipeIndex, WINUSB_PIPE_INFORMATION &PipeInformation ) : bool
AltSettingNumber byte
PipeIndex byte
PipeInformation WINUSB_PIPE_INFORMATION
Результат bool

ReadPipe() публичный Метод

public ReadPipe ( byte PipeID, Array Buffer, uint BufferLength, uint &LengthTransferred, IntPtr Overlapped ) : bool
PipeID byte
Buffer System.Array
BufferLength uint
LengthTransferred uint
Overlapped System.IntPtr
Результат bool

ReadPipe() публичный Метод

public ReadPipe ( byte PipeID, Array Buffer, uint BufferLength, uint &LengthTransferred, KOVL_HANDLE Overlapped ) : bool
PipeID byte
Buffer System.Array
BufferLength uint
LengthTransferred uint
Overlapped KOVL_HANDLE
Результат bool

ReadPipe() публичный Метод

public ReadPipe ( byte PipeID, IntPtr Buffer, uint BufferLength, uint &LengthTransferred, IntPtr Overlapped ) : bool
PipeID byte
Buffer System.IntPtr
BufferLength uint
LengthTransferred uint
Overlapped System.IntPtr
Результат bool

ReadPipe() публичный Метод

public ReadPipe ( byte PipeID, IntPtr Buffer, uint BufferLength, uint &LengthTransferred, KOVL_HANDLE Overlapped ) : bool
PipeID byte
Buffer System.IntPtr
BufferLength uint
LengthTransferred uint
Overlapped KOVL_HANDLE
Результат bool

ReleaseInterface() публичный Метод

public ReleaseInterface ( byte NumberOrIndex, bool IsIndex ) : bool
NumberOrIndex byte
IsIndex bool
Результат bool

ResetDevice() публичный Метод

public ResetDevice ( ) : bool
Результат bool

ResetPipe() публичный Метод

public ResetPipe ( byte PipeID ) : bool
PipeID byte
Результат bool

SelectInterface() публичный Метод

public SelectInterface ( byte NumberOrIndex, bool IsIndex ) : bool
NumberOrIndex byte
IsIndex bool
Результат bool

SetAltInterface() публичный Метод

public SetAltInterface ( byte NumberOrIndex, bool IsIndex, byte AltSettingNumber ) : bool
NumberOrIndex byte
IsIndex bool
AltSettingNumber byte
Результат bool

SetConfiguration() публичный Метод

public SetConfiguration ( byte ConfigurationNumber ) : bool
ConfigurationNumber byte
Результат bool

SetCurrentAlternateSetting() публичный Метод

public SetCurrentAlternateSetting ( byte AltSettingNumber ) : bool
AltSettingNumber byte
Результат bool

SetPipePolicy() публичный Метод

public SetPipePolicy ( byte PipeID, uint PolicyType, uint ValueLength, Array Value ) : bool
PipeID byte
PolicyType uint
ValueLength uint
Value Array
Результат bool

SetPipePolicy() публичный Метод

public SetPipePolicy ( byte PipeID, uint PolicyType, uint ValueLength, IntPtr Value ) : bool
PipeID byte
PolicyType uint
ValueLength uint
Value IntPtr
Результат bool

SetPowerPolicy() публичный Метод

public SetPowerPolicy ( uint PolicyType, uint ValueLength, Array Value ) : bool
PolicyType uint
ValueLength uint
Value Array
Результат bool

SetPowerPolicy() публичный Метод

public SetPowerPolicy ( uint PolicyType, uint ValueLength, IntPtr Value ) : bool
PolicyType uint
ValueLength uint
Value IntPtr
Результат bool

UsbK() публичный Метод

public UsbK ( IntPtr DeviceHandle, KUSB_DRVID driverID ) : System
DeviceHandle IntPtr
driverID KUSB_DRVID
Результат System

UsbK() публичный Метод

public UsbK ( KLST_DEVINFO_HANDLE DevInfo ) : System
DevInfo KLST_DEVINFO_HANDLE
Результат System

WritePipe() публичный Метод

public WritePipe ( byte PipeID, Array Buffer, uint BufferLength, uint &LengthTransferred, IntPtr Overlapped ) : bool
PipeID byte
Buffer Array
BufferLength uint
LengthTransferred uint
Overlapped IntPtr
Результат bool

WritePipe() публичный Метод

public WritePipe ( byte PipeID, Array Buffer, uint BufferLength, uint &LengthTransferred, KOVL_HANDLE Overlapped ) : bool
PipeID byte
Buffer Array
BufferLength uint
LengthTransferred uint
Overlapped KOVL_HANDLE
Результат bool

WritePipe() публичный Метод

public WritePipe ( byte PipeID, IntPtr Buffer, uint BufferLength, uint &LengthTransferred, IntPtr Overlapped ) : bool
PipeID byte
Buffer IntPtr
BufferLength uint
LengthTransferred uint
Overlapped IntPtr
Результат bool

WritePipe() публичный Метод

public WritePipe ( byte PipeID, IntPtr Buffer, uint BufferLength, uint &LengthTransferred, KOVL_HANDLE Overlapped ) : bool
PipeID byte
Buffer IntPtr
BufferLength uint
LengthTransferred uint
Overlapped KOVL_HANDLE
Результат bool

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

driverAPI защищенное свойство

protected KUSB_DRIVER_API driverAPI
Результат KUSB_DRIVER_API

handle защищенное свойство

protected KUSB_HANDLE handle
Результат KUSB_HANDLE