如何通過VB獲取網卡地址
1)在Visual Basic中生成標準的EXE文件。默認情況下創建Form1。
2)在Form1中添加一個命令按鈕,默認命名爲Command1。
3)將以下代碼放入Form1的描述部分。
選項顯式
私有常量NCBASTAT = &H33
私有常數NCBNAMSZ = 16
私有常量HEAP_ZERO_MEMORY = &H8
私有常數堆_生成_例外= &H4
私有Const NCBRESET = &H32
私人型NCB
ncb _ command As Byte & acute整數
ncb _ retcode As Byte & acute整數
ncb_lsn爲字節& acute整數
ncb _ num As Byte & acute整數
ncb _ buffer As Long & acute線
ncb_length爲整數
ncb_callname As String * NCBNAMSZ
ncb_name As String * NCBNAMSZ
ncb_rto爲字節& acute整數
ncb _ sto As Byte & acute整數
ncb_post As Long
ncb_lana_num As字節& acute整數
ncb _ cmd _ cplt As Byte & acute整數
NCB _ reserve(9)As Byte & acute;保畱,必須爲0
ncb_event As Long
結束類型
0條評論