如何通过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条评论