Пример #1
0
 /// <summary>
 /// Constructs a new USBNotifier that will watch for events on
 /// devices matching the given interface GUID. A window handle
 /// is needed since the notifier relies on window messages.
 /// </summary>
 /// <param name="windowHandle">Window handle of a window that will be used internally for device notification messages.</param>
 /// <param name="guid">The interface GUID of the devices to watch.</param>
 public USBNotifier(IntPtr windowHandle, Guid guid)
 {
     _guid = guid;
     _hook = new DeviceNotifyHook(this, windowHandle, _guid);
 }
Пример #2
0
 /// <summary>
 /// Constructs a new USBNotifier that will watch for events on
 /// devices matching the given interface GUID. A Windows Forms control
 /// is needed since the notifier relies on window messages.
 /// </summary>
 /// <param name="control">A control that will be used internally for device notification messages.
 /// You can use a Form object for example.</param>
 /// <param name="guid">The interface GUID of the devices to watch.</param>
 public USBNotifier(Guid guid)
 {
     _guid = guid;
     _hook = new DeviceNotifyHook(this, _guid);
 }
Пример #3
0
 /// <summary>
 /// Constructs a new USBNotifier that will watch for events on
 /// devices matching the given interface GUID. A Windows Forms control
 /// is needed since the notifier relies on window messages.
 /// </summary>
 /// <param name="control">A control that will be used internally for device notification messages.
 /// You can use a Form object for example.</param>
 /// <param name="guid">The interface GUID of the devices to watch.</param>
 public USBNotifier(Control control, Guid guid)
 {
     _guid = guid;
     _hook = new DeviceNotifyHook(this, control, _guid);
 }
Пример #4
0
 /// <summary>
 /// Constructs a new USBNotifier that will watch for events on 
 /// devices matching the given interface GUID. A Windows Forms control 
 /// is needed since the notifier relies on window messages.
 /// </summary>
 /// <param name="control">A control that will be used internally for device notification messages. 
 /// You can use a Form object for example.</param>
 /// <param name="guid">The interface GUID of the devices to watch.</param>
 public USBNotifier(Control control, Guid guid)
 {
     _guid = guid;
     _hook = new DeviceNotifyHook(this, control, _guid);
 }