C# Класс ScpControl.Usb.PnP.UsbNotifier

A modified version of the USB HID Component for C#. http://www.codeproject.com/Articles/18099/A-USB-HID-Component-for-C
Наследование: ScpControl.Usb.PnP.Win32Usb
Показать файл Открыть проект

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

Метод Описание
CheckDevicePresent ( ) : void

Checks the devices that are present at the moment and checks if one of those is the device you defined by filling in the product id and vendor id.

ParseMessages ( int msg, IntPtr wParam ) : void

This method will filter the messages that are passed for usb device change messages only. And parse them and take the appropriate action

RegisterHandle ( IntPtr handle ) : void

Registers this application, so it will be notified for usb events.

UnregisterHandle ( ) : bool

Unregisters this application, so it won't be notified for usb events.

UsbNotifier ( ) : System
UsbNotifier ( System.Guid classGuid ) : System

UsbNotifier ( ushort vid, ushort pid ) : System

UsbNotifier ( ushort vid, ushort pid, System.Guid classGuid ) : System

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

Метод Описание
FindDevice ( int nVid, int nPid ) : bool

Finds a device given its PID and VID

GetDevicePath ( IntPtr hInfoSet, DeviceInterfaceData &oInterface ) : string

Helper method to return the device path given a DeviceInterfaceData structure and an InfoSet handle. Used in 'FindDevice' so check that method out to see how to get an InfoSet handle and a DeviceInterfaceData.

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

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

Checks the devices that are present at the moment and checks if one of those is the device you defined by filling in the product id and vendor id.
public CheckDevicePresent ( ) : void
Результат void

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

This method will filter the messages that are passed for usb device change messages only. And parse them and take the appropriate action
public ParseMessages ( int msg, IntPtr wParam ) : void
msg int The window message received by the window procedure.
wParam System.IntPtr The wParam argument.
Результат void

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

Registers this application, so it will be notified for usb events.
public RegisterHandle ( IntPtr handle ) : void
handle System.IntPtr a IntPtr, that is a handle to the application.
Результат void

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

Unregisters this application, so it won't be notified for usb events.
public UnregisterHandle ( ) : bool
Результат bool

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

public UsbNotifier ( ) : System
Результат System

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

public UsbNotifier ( System.Guid classGuid ) : System
classGuid System.Guid GUID that specifies the device interface class.
Результат System

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

public UsbNotifier ( ushort vid, ushort pid ) : System
vid ushort Vendor identifier.
pid ushort Product identifier.
Результат System

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

public UsbNotifier ( ushort vid, ushort pid, System.Guid classGuid ) : System
vid ushort Vendor identifier.
pid ushort Product identifier.
classGuid System.Guid GUID that specifies the device interface class.
Результат System