private unsafe bool RaiseDeviceEvent(EventHandler <DeviceEventArgsCancel> evt, WIN32.DEV_BROADCAST_HDR *pHeader) { if (evt != null) { DeviceEventArgsCancel args = new DeviceEventArgsCancel(); args.pHeader = pHeader; args.Cancel = false; evt(null, args); return(args.Cancel); } return(false); }
private unsafe bool RaiseDeviceEvent(EventHandler<DeviceEventArgsCancel> evt, WIN32.DEV_BROADCAST_HDR* pHeader) { if (evt != null) { DeviceEventArgsCancel args = new DeviceEventArgsCancel(); args.pHeader = pHeader; args.Cancel = false; evt(null, args); return args.Cancel; } return false; }