求大师指点,传进去参数后得到的数据一部分是错误的,是不是数据长度小了呢?

羽熙 羽熙 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
Public Type DS_INFO_ 'typedef struct _DS_INFO
apid As Long 'Application ID,定义防火墙版本号
hwid As Integer '硬件ID,定义网关硬件版本号
flag As Integer '用于内部使用,不要修改
real_ip_addr As Long '网管的真实IP地址。常规使用中,用户可以忽略此域值
pseudo_ip_addr As Long '伪网关的IP地址。使用这个地址和网关通信。如果网关被定位为内部NAT网络,这就是被NAT服务器标志的伪网关的IP地址。如果网关没有使用任何的NAT,这个值和真实的IP地址相同
host_ip_addr As Long '主机的IP地址。使用这个值就可以知道网关连接的是哪个主机硬件接口
mac(MACLEN) As Byte '6字节的MAC地址。如果MAC地址是"00-90-E8-01-02-03", MAC[0]就是0,MAC[1]就是0x90(hex),MAC[2]就是0xE8(hex)等等,
End Type

Public Function myEnumSearchProc(ByRef dsinfo As DS_INFO_) As Long
mySearchInfo(search_count).dshdl = -1
If (dsinfo.hwid = NE4100T) Then
modelstring = "Found: NE4100T" & txtstring
CopyMemory mySearchInfo(search_count).ds_info, dsinfo, LenB(mySearchInfo(search_count).ds_info)
search_count = search_count + 1
ElseIf (dsinfo.hwid = NE4110S) Then
modelstring = "Found: NE4110S" & txtstring
CopyMemory mySearchInfo(search_count).ds_info, dsinfo, LenB(mySearchInfo(search_count).ds_info)

Debug.Print mySearchInfo(search_count).ds_info.apid'错
Debug.Print mySearchInfo(search_count).ds_info.hwid'正确
Debug.Print mySearchInfo(search_count).ds_info.flag'正确
Debug.Print mySearchInfo(search_count).ds_info.real_ip_addr'错
Debug.Print mySearchInfo(search_count).ds_info.pseudo_ip_addr'错
Debug.Print mySearchInfo(search_count).ds_info.host_ip_addr'错

Dim ij As Integer
For ij = 0 To 5
Debug.Print mySearchInfo(search_count).ds_info.mac(ij)
Next

search_count = search_count + 1
End If
End Function
...全文

相关推荐

评论
收藏 已收藏
分享
返回顶部
羽熙
网络编程 1,502 成员 18,427 内容