求大师指点,传进去参数后得到的数据一部分是错误的,是不是数据长度小了呢?
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
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
...全文
相关推荐
数据结构 求链表长度
本话题将深入探讨如何使用C语言实现求链表长度的功能,并考虑界面友好的交互设计。首先,我们需要理解链表的基本概念。链表由一系列节点组成,每个节点包含数据部分和指向下一个节点的指针。
单链表的创建,插入,删除,查找,求长度
单链表是一种基础的数据结构,它在计算机科学中扮演着重要的角色。单链表由一系列节点组成,每个节点包含数据和指向下一个节点的指针。本文将深入探讨单链表的创建、插入、删除、查找以及求长度的操作。
sqlldr报超出字符长度错误
### SQL*Loader 超出字符长度错误解析与解决方案#### 概述在使用SQL*Loader工具导入数据时,可能会遇到超出字符长度限制的错误。
Shell脚本传参数方法总结
,输出将是空值或错误提示。
c 语言写的求一行字符串中单词长度最大的那个单词
标题提到的“求一行字符串中单词长度最大的那个单词”是一个常见的字符串处理问题,它涉及到字符串的分割、遍历以及动态记录最大长度。下面将详细讲解这个过程。首先,我们需要理解C语言中的字符串。


网络编程
