コード例 #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
ファイル: USBNotifier.cs プロジェクト: zzzz123321/WPinternals
 /// <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
ファイル: USBNotifier.cs プロジェクト: MEEEngineer/winusbnet
 /// <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);
 }