public Boolean RegisterDeviceNotification(IntPtr hwndHandle) { if (false == DeviceManagement.RegisterForHIDDeviceNotifications(hwndHandle, ref m_pdeviceHandler)) { m_strLastErrorInfo = "Failed to register for HID device notifications!"; return(false); } return(true); }