#COMPILE EXE
#DIM ALL
FUNCTION PBMAIN () AS LONG
DIM ip&,a$, p AS BYTE PTR
HOST ADDR "baidu.com" TO ip&
p = VARPTR(ip&)
a$ = USING$("#_.#_.#_.#", @p, @p[1], @p[2], @p[3])
MSGBOX CHR$(a$)
END FUNCTION
执行结果与ping命令查询的结果是一致的,即 202.108.22.43
#DIM ALL
FUNCTION PBMAIN () AS LONG
DIM ip&,a$, p AS BYTE PTR
HOST ADDR "baidu.com" TO ip&
p = VARPTR(ip&)
a$ = USING$("#_.#_.#_.#", @p, @p[1], @p[2], @p[3])
MSGBOX CHR$(a$)
END FUNCTION
执行结果与ping命令查询的结果是一致的,即 202.108.22.43