Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (26 sloc) 0.681 kB
using System;
using System.Windows.Forms;
namespace UsbLib
{
public class UsbDeviceNotification
{
private const int WM_DEVICECHANGE = 0x0219;
public event EventHandler UsbDeviceArrived;
public void WndProc(ref Message message)
{
switch (message.Msg)
{
case WM_DEVICECHANGE:
OnUsbDeviceArrived();
break;
}
}
private void OnUsbDeviceArrived()
{
if (UsbDeviceArrived != null)
{
UsbDeviceArrived(this, new EventArgs());
}
}
}
}
Jump to Line
Something went wrong with that request. Please try again.