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

  • 大小: 183KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-29
  • 語言: C#
  • 標簽: C#??HID??

資源簡介

網上下載的C#讀寫HID的代碼修改的,https://blog.csdn.net/u010875635/article/details/73321066,沒積分請到https://github.com/beatfan/HID_Communication下載原始代碼。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Text;
using?System.Runtime.InteropServices;
using?System.Collections;

namespace?Hid_test
{
????public?class?ClassHid
????{
????????Guid?guidHID?=?Guid.Empty;
????????IntPtr?hDevInfo;


????????//以下是調用windows的API的函數

????????//獲得GUID
????????[DllImport(“hid.dll“)]
????????public?static?extern?void?HidD_GetHidGuid(ref?Guid?HidGuid);


????????public?enum?DIGCF
????????{
????????????DIGCF_DEFAULT?=?0x1
????????????DIGCF_PRESENT?=?0x2
????????????DIGCF_ALLCLASSES?=?0x4
????????????DIGCF_PROFILE?=?0x8
????????????DIGCF_DEVICEINTERFACE?=?0x10
????????}

????????//過濾設備,獲取需要的設備
????????[DllImport(“setupapi.dll“?SetLastError?=?true)]
????????public?static?extern?IntPtr?SetupDiGetClassDevs(ref?Guid?ClassGuid?uint?Enumerator?IntPtr?HwndParent?DIGCF?Flags);


????????//獲取設備,true獲取到
????????public?struct?SP_DEVICE_INTERFACE_DATA
????????{
????????????public?int?cbSize;
????????????public?Guid?interfaceClassGuid;
????????????public?int?flags;
????????????public?int?reserved;
????????}


????????[DllImport(“setupapi.dll“?CharSet?=?CharSet.Auto?SetLastError?=?true)]
????????public?static?extern?Boolean?SetupDiEnumDeviceInterfaces(IntPtr?hDevInfo?IntPtr?devInfo?ref?Guid?interfaceClassGuid?UInt32?memberIndex?ref?SP_DEVICE_INTERFACE_DATA?deviceInterfaceData);
????????

????????//?獲取接口的詳細信息?必須調用兩次?第1次返回長度?第2次獲取數據?
????????[StructLayout(LayoutKind.Sequential)]
????????public?class?SP_DEVINFO_DATA
????????{
????????????public?int?cbSize?=?Marshal.SizeOf(typeof(SP_DEVINFO_DATA));
????????????public?Guid?classGuid?=?Guid.Empty;?//?temp
????????????public?int?devInst?=?0;?//?dumy
????????????public?int?reserved?=?0;
????????}

????????[StructLayout(LayoutKind.Sequential?Pack?=?2)]
????????internal?struct?SP_DEVICE_INTERFACE_DETAIL_DATA
????????{

????????????internal?int?cbSize;

????????????internal?short?devicePath;

????????}

????????[DllImport(“setupapi.dll“?SetLastError?=?true?CharSet?=?CharSet.Auto)]
????????private?static?extern?bool?SetupDiGetDeviceInterfaceDetail(IntPtr?deviceInfoSet?ref?SP_DEVICE_INTERFACE_DATA?deviceInterfaceData?IntPtr?deviceInterfaceDetailData
????????????int?deviceInterfaceDetailDataSize?ref?int?requiredSize?SP_DEVINFO_DATA?deviceInfoData);



????????//獲取設備文件

????????[DllImport(“kernel32.dll“?SetLastError?=?true)]
????????private?static?extern?int?CreateFile(
????????????string?lpFileName????????????????????????????//?file?name
????????????uint?dwDesiredAccess????????????????????????//?access?mode
????????????uint?dwShareMode????????????????????????????//?share?mode
????????????uint?lpSecurityAttributes????????????????????//?SD
????????????uint?dwCreationDisposition????????????????????//?how?to?create
????????????uint?dwFlagsAndAttributes????????????????????//?file?attributes
????????????uint?hTemplateFile????????????????????????????//?handle?to

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

?????文件????????307??2018-05-03?10:27??HID_Communication\.git\config

?????文件?????????73??2018-05-03?10:27??HID_Communication\.git\description

?????文件?????????23??2018-05-03?10:27??HID_Communication\.git\HEAD

?????文件????????478??2018-05-03?10:27??HID_Communication\.git\hooks\applypatch-msg.sample

?????文件????????896??2018-05-03?10:27??HID_Communication\.git\hooks\commit-msg.sample

?????文件????????189??2018-05-03?10:27??HID_Communication\.git\hooks\post-update.sample

?????文件????????424??2018-05-03?10:27??HID_Communication\.git\hooks\pre-applypatch.sample

?????文件???????1642??2018-05-03?10:27??HID_Communication\.git\hooks\pre-commit.sample

?????文件???????1348??2018-05-03?10:27??HID_Communication\.git\hooks\pre-push.sample

?????文件???????4951??2018-05-03?10:27??HID_Communication\.git\hooks\pre-rebase.sample

?????文件????????544??2018-05-03?10:27??HID_Communication\.git\hooks\pre-receive.sample

?????文件???????1239??2018-05-03?10:27??HID_Communication\.git\hooks\prepare-commit-msg.sample

?????文件???????3610??2018-05-03?10:27??HID_Communication\.git\hooks\update.sample

?????文件???????2205??2018-05-03?10:27??HID_Communication\.git\index

?????文件????????240??2018-05-03?10:27??HID_Communication\.git\info\exclude

?????文件????????191??2018-05-03?10:27??HID_Communication\.git\logs\HEAD

?????文件????????191??2018-05-03?10:27??HID_Communication\.git\logs\refs\heads\master

?????文件????????191??2018-05-03?10:27??HID_Communication\.git\logs\refs\remotes\origin\HEAD

?????文件?????????40??2018-05-03?10:27??HID_Communication\.git\objects\14\5a977d26a404322c6dbf29a0eb862433c2cf2e

?????文件???????1184??2018-05-03?10:27??HID_Communication\.git\objects\15\0f2169bf7ae7e518caf3ef47a8cf65b8c42ec0

?????文件???????1730??2018-05-03?10:27??HID_Communication\.git\objects\17\4ebc727903fe8648fc4dec10d4e33de464b52b

?????文件????????136??2018-05-03?10:27??HID_Communication\.git\objects\22\87106f76fa5df14603813ac7a328d65dd9b5c4

?????文件?????????35??2018-05-03?10:27??HID_Communication\.git\objects\2b\cc8f2c5390ad7aa13f3b15260152baa5ea83a9

?????文件????????367??2018-05-03?10:27??HID_Communication\.git\objects\30\476bd22024a544026353b69a1042da9b63e5a3

?????文件????????186??2018-05-03?10:27??HID_Communication\.git\objects\39\645652af62950ebf3b28ec3a5400dcec30b1c4

?????文件????????910??2018-05-03?10:27??HID_Communication\.git\objects\3f\a13bb918c867ff7772b95dffcec91cc17b564f

?????文件???????3974??2018-05-03?10:27??HID_Communication\.git\objects\3f\d5dfba1db0d2f6431bc6c9b39e4d3ec3c1915e

?????文件????????163??2018-05-03?10:27??HID_Communication\.git\objects\41\4b9d82cb308d7311c5d60826b3dc29d905da1f

?????文件????????384??2018-05-03?10:27??HID_Communication\.git\objects\44\eb6f31030e6d8d4e11b76aa1dd47cf5140498a

?????文件????????783??2018-05-03?10:27??HID_Communication\.git\objects\50\5c2d2f025a5d74284eb81c5d11cf3e9c3c2447

............此處省略117個文件信息

評論

共有 條評論