91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 10KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-05
  • 語言: C#
  • 標簽: C#??設(shè)備移除??

資源簡介

C# USB設(shè)備檢測,以及自動安全移除USB設(shè)備,源代碼實例

資源截圖

代碼片段和文件信息

//?UsbEject?version?1.0?March?2006
//?written?by?Simon?Mourier?

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Diagnostics;
using?System.Text;

namespace?TSB_Print.Class
{
????///?
????///?A?generic?base?class?for?physical?devices.
????///?

????[TypeConverter(typeof(ExpandableobjectConverter))]
????public?class?Device?:?IComparable
????{
????????private?string?_path;
????????private?DeviceClass?_deviceClass;
????????private?string?_description;
????????private?string?_class;
????????private?string?_classGuid;
????????private?Device?_parent;
????????private?int?_index;
????????private?DeviceCapabilities?_capabilities?=?DeviceCapabilities.Unknown;
????????private?List?_removableDevices;
????????private?string?_friendlyName;
????????private?Native.SP_DEVINFO_DATA?_deviceInfoData;

????????internal?Device(DeviceClass?deviceClass?Native.SP_DEVINFO_DATA?deviceInfoData?string?path?int?index)
????????{
????????????if?(deviceClass?==?null)
????????????????throw?new?ArgumentNullException(“deviceClass“);

????????????if?(deviceInfoData?==?null)
????????????????throw?new?ArgumentNullException(“deviceInfoData“);

????????????_deviceClass?=?deviceClass;
????????????_path?=?path;?//?may?be?null
????????????_deviceInfoData?=?deviceInfoData;
????????????_index?=?index;
????????}

????????///?
????????///?Gets?the?device‘s?index.
????????///?

????????public?int?Index
????????{
????????????get
????????????{
????????????????return?_index;
????????????}
????????}

????????///?
????????///?Gets?the?device‘s?class?instance.
????????///?

????????[Browsable(false)]
????????public?DeviceClass?DeviceClass
????????{
????????????get
????????????{
????????????????return?_deviceClass;
????????????}
????????}

????????///?
????????///?Gets?the?device‘s?path.
????????///?

????????public?string?Path
????????{
????????????get
????????????{
????????????????if?(_path?==?null)
????????????????{
????????????????}
????????????????return?_path;
????????????}
????????}

????????///?
????????///?Gets?the?device‘s?instance?handle.
????????///?

????????public?int?InstanceHandle
????????{
????????????get
????????????{
????????????????return?_deviceInfoData.devInst;
????????????}
????????}

????????///?
????????///?Gets?the?device‘s?class?name.
????????///?

????????public?string?Class
????????{
????????????get
????????????{
????????????????if?(_class?==?null)
????????????????{
????????????????????_class?=?_deviceClass.GetProperty(_deviceInfoData?Native.SPDRP_CLASS?null);
????????????????}
????????????????return?_class;
????????????}
????????}

????????///?
????????///?Gets?the?device‘s?class?Guid?as?a?string.
????????///?

????????public?strin

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????8581??2018-02-27?09:55??USB操作類\Device.cs

?????文件????????963??2018-02-27?09:56??USB操作類\DeviceCapabilities.cs

?????文件???????9202??2018-02-27?09:53??USB操作類\DeviceClass.cs

?????文件????????601??2018-02-27?09:58??USB操作類\DiskDeviceClass.cs

?????文件???????7071??2018-02-27?09:53??USB操作類\Native.cs

?????文件???????7471??2018-02-27?09:58??USB操作類\Volume.cs

?????文件???????1331??2018-02-27?09:53??USB操作類\VolumeDeviceClass.cs

????..A.SHR???????326??2018-02-27?09:59??USB操作類\vssver2.scc

?????文件???????1134??2018-03-03?09:39??USB操作類\調(diào)用.txt

?????目錄??????????0??2018-03-03?09:38??USB操作類

-----------?---------??----------?-----??----

????????????????36680????????????????????10


評論

共有 條評論