vc中的typedef结构在autoit的表达
示例:typedef struct _MIB_IFROW {WCHAR wszName;
DWORD dwIndex;
DWORD dwType;
DWORD dwMtu;
DWORD dwSpeed;
DWORD dwPhysAddrLen;
BYTEbPhysAddr;
DWORD dwAdminStatus;
DWORD dwOperStatus;
DWORD dwLastChange;
DWORD dwInOctets;
DWORD dwInUcastPkts;
DWORD dwInNUcastPkts;
DWORD dwInDiscards;
DWORD dwInErrors;
DWORD dwInUnknownProtos;
DWORD dwOutOctets;
DWORD dwOutUcastPkts;
DWORD dwOutNUcastPkts;
DWORD dwOutDiscards;
DWORD dwOutErrors;
DWORD dwOutQLen;
DWORD dwDescrLen;
BYTEbDescr;
} MIB_IFROW, *PMIB_IFROW;在autoit中表达为:DllStructCreate("short;dword;dword;dword;dword;dword;char;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;char")
分界线====================================
问题:typedef struct _MIB_IFTABLE {
DWORD dwNumEntries;
MIB_IFROW table;
} MIB_IFTABLE, *PMIB_IFTABLE;在autoit中又该怎么表达? 顶上,相关UDF已发至UDF版块
http://www.autoitx.com/forum.php?mod=viewthread&tid=6236&extra=page%3D1 dword;wchar;dword;byte;dword;char
第一个dword对应结构中的dwNumEntries,余下的代表结构MIB_IFROW,可以是任意大小,这取决于你电脑中网卡的数量,但成员的类型不能变。
[ 本帖最后由 pusofalse 于 2009-4-6 09:39 编辑 ] 问题是我正是要通过此函数来获取网卡的数量,又怎么可能会知道呢?
回复 1# ceoguang 的帖子
MIB_IFROW 是一个数据结构,数据结构包含一个数据结构的话,类型请用ptr (指针)参考:
http://msdn.microsoft.com/en-us/library/aa366836(VS.85).aspx
http://msdn.microsoft.com/en-us/library/aa366842(VS.85).aspx
table
An array of MIB_IFROW structures containing interface entries 回楼上,上面两个链接早已看过,只是不知在autoit中怎么表达.
页:
[1]