RegisterDeviceNotification (user32)
Last changed: eggie5-149.63.77.160

.
Summary

This Windows API function can be used to request to be informed when a device (USB) is attacted or removed.

C# Signature:

[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr RegisterDeviceNotification(IntPtr hRecipient,
   IntPtr NotificationFilter, uint Flags);

VB Signature:

<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

User-Defined Types:

None.

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

Do you know one? Please contribute it!

Documentation