C# Class 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
Inheritance: ScpControl.Usb.PnP.Win32Usb
Afficher le fichier Open project: nefarius/ScpToolkit

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
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.

Method Details

CheckDevicePresent() public méthode

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
Résultat void

ParseMessages() public méthode

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.
Résultat void

RegisterHandle() public méthode

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.
Résultat void

UnregisterHandle() public méthode

Unregisters this application, so it won't be notified for usb events.
public UnregisterHandle ( ) : bool
Résultat bool

UsbNotifier() public méthode

public UsbNotifier ( ) : System
Résultat System

UsbNotifier() public méthode

public UsbNotifier ( System.Guid classGuid ) : System
classGuid System.Guid GUID that specifies the device interface class.
Résultat System

UsbNotifier() public méthode

public UsbNotifier ( ushort vid, ushort pid ) : System
vid ushort Vendor identifier.
pid ushort Product identifier.
Résultat System

UsbNotifier() public méthode

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.
Résultat System