public static bool RemoveDevice(RemoveDeviceForm.RemoveDeviceOptions removeDeviceOptions,
                                        IntPtr hWnwd,
                                        DEIFlags flags)
        {
            DeviceRemoveInfo deInfo = new DeviceRemoveInfo(removeDeviceOptions, flags, hWnwd);

            EnumerateDevices(deInfo);

            if (deInfo.Removed > 0)
            {
                Wdi.UpdateDriver(removeDeviceOptions.DeviceItem.BuildInfHardwareID());
            }

            return(deInfo.Removed > 0);
        }
        public static bool RemoveDevice(RemoveDeviceForm.RemoveDeviceOptions removeDeviceOptions,
                                        IntPtr hWnwd,
                                        DEIFlags flags)
        {
            DeviceRemoveInfo deInfo = new DeviceRemoveInfo(removeDeviceOptions, flags, hWnwd);
            EnumerateDevices(deInfo);

            if (deInfo.Removed > 0)
                Wdi.UpdateDriver(removeDeviceOptions.DeviceItem.BuildInfHardwareID());

            return deInfo.Removed > 0;
        }