コード例 #1
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;
        }
コード例 #2
0
 public DeviceRemoveInfo(RemoveDeviceForm.RemoveDeviceOptions removeDeviceOptions, DEIFlags flags, IntPtr hwnd)
     : base(flags, hwnd)
 {
     mRemoveDeviceOptions = removeDeviceOptions;
 }