找回密码
 加入
搜索
查看: 1841|回复: 3

[AU3基础] DllStructCreate如何创建带union的结构????

  [复制链接]
发表于 2011-6-14 11:27:04 | 显示全部楼层 |阅读模式
typedef struct in_addr {
        union {
                struct { UCHAR s_b1,s_b2,s_b3,s_b4; } S_un_b;
                struct { USHORT s_w1,s_w2; } S_un_w;
                ULONG S_addr;
        } S_un;

上面的结构。
$Rdll = DllCall("WS2_32.dll", "str*", "inet_ntoa", "")

我想用inet_ntoa这个函数。
发表于 2011-6-14 13:22:04 | 显示全部楼层
DllCall("Ws2_32.dll", "str", "inet_ntoa", "int", DllStructGetData(DllStructCreate("short;ushort;uint;char[8]"), 3))
 楼主| 发表于 2011-6-14 14:07:20 | 显示全部楼层
太感谢了~~~
发表于 2011-6-15 23:39:17 | 显示全部楼层
能说明一下为什么要写成这样!
DllStructCreate("short;ushort;uint;char[8]")
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-21 04:32 , Processed in 0.079824 second(s), 22 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表