This Windows API function can be used to request to be informed when a device (USB) is attacted or removed.
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr RegisterDeviceNotification(IntPtr hRecipient,
IntPtr NotificationFilter, uint Flags);
<DllImport("user32.dll", CharSet:=CharSet.Auto, SetLastError:=true)> _
private shared function RegisterDeviceNotification(byval hRecipient as IntPtr, _
byval NotificationFilter as IntPtr, _
byval Flags as Int32) _
as IntPtr
end function
None.
None.
Please add some!
Please add some!
Do you know one? Please contribute it!