Registers the device or type of device for which a window will receive notifications. A handle to the window or service that will receive device events for. I want to use the RegisterDeviceNotification function from user32.dll to get. [SOLVED] How to use RegisterDeviceNotification. Here is a snippet from MSDN: Check for device change (add/remove) events. Ask Question. Marshal.StructureToPtr(dbi, buffer, true); notificationHandle = RegisterDeviceNotification. Use RegisterDeviceNotification() for ALL USB devices. DEV_BROADCAST_DEVICEINTERFACE flag in the RegisterDeviceNotification(). blogs.msdn.com/doronh/archive. RegisterDeviceNotification on MSDN Please edit this page! Do you have. helpful tips or sample code to share for using this API in managed code? corrections to the. An application can register for device change notifications using RegisterDeviceNotification Function (Windows) API. When an application or service calls. A user-mode application to detect hardware add/remove with WM_DEVICECHANGE and RegisterDeviceNotification(); Author: Sam NG. see MSDN Handling DIF. I am writing a C class library for a WPF application. The class library should raise an event whenever some USB device is plugged in/plugged out. I am. An application can register for device change notifications using RegisterDeviceNotification Function (Windows) API. When an application or service calls. RegisterDeviceNotification in WPF. (WPF) . RegisterDeviceNotification.