FT4222H學習筆記3 搭建C 環境

2021-09-26 12:56:00 字數 1459 閱讀 6807

d2xx是ftdi提供的可以直接通過乙個dll訪問usb裝置的驅動程式。

2. 解壓d2xx後資料夾內有對應的usb驅動檔案、ftd2xx.h和對應的dll或者靜態庫。c#只能直接使用dll的方式。資料夾amd64對應64位系統,而i386對應32位系統。

4. 在執行目錄內拷貝對應的檔案

【新建乙個ft4222h的類,檔案為ft4222h.cs。】

【根據ftd2xx.dll的雜湊值判斷dll檔案是否符合當前系統】

private

bool

checkdllmatchsystem()

else

//計算第乙個檔案的雜湊值

varhash = system.security.cryptography.

hashalgorithm

.create();

varstream_1 =

newsystem.io.

filestream

(file1, system.io.

filemode

.open);

byte

hashbyte_1 = hash.computehash(stream_1);

stream_1.close(); //

計算第二個檔案的雜湊值

varstream_2 =

newsystem.io.

filestream

(file2, system.io.

filemode

.open);

byte

hashbyte_2 = hash.computehash(stream_2);

stream_2.close(); if

(bitconverter

.tostring(hashbyte_1) ==

bitconverter

.tostring(hashbyte_2))

return

true;

else

return

false;

}【根據系統拷貝對應的dll檔案】

public

ft4222h()

else

} }

FT260學習筆記3 開啟裝置

獲取所有連線的hid的裝置路徑,用的api函式是gethiddevicelist,將讀取到的資訊加到乙個combobox中。cbdevicelist.items.clear list string devicelist newlist string hid.gethiddevicelist refd...

H5 學習筆記3

html標籤 表單 input標籤 屬性 type text文字框 password密碼框 radio單選框 checkbox多選框 button按鈕 reset重置 submit提交 select標籤 屬性 option 下來框 textarea標籤 文字域 button標籤 作用範圍比較廣 fo...

H3C命令詳解(筆記)

1 常用命令 使用者檢視模式,僅僅能配置基本引數,除錯命令,許可權較小。系統檢視模式,可以做高階配置 system view 進入系統檢視 quit 退出當前模式 sysname youname 命名 display this 檢視當前配置 2 給路由器介面配置ip位址 int e0 0 0 進入介...