📄 使用说明.txt
字号:
版权所有
作者:Summerheart
Blog: blog.csdn.net/Summerheart
Summerheart.cnblogs.com
说明ws2_32.dll 仅作备用,若系统里没有此文件或文件版本不同时使用。
==========================================================
本人用VC++写的获取本机IP的动态库,并支持多个网卡。
若有多个网卡会用;号分隔开。调用定义
PB调用定义:
Function uLong GetHostIpList(ref string hostAddressip) Library "GetIP60.dll"
PB11.2调用定义:
Function uLong GetHostIpList(ref string hostAddressip) Library "GetIP60.dll" ALIAS FOR "GetHostIpList;ansi"
调用方法
string ls_HostIP = space(128)
if GetHostIpList(ls_HostIP) =0 then
sle_1.text=trim(ls_HostIP)
end if
==========================================================
获取主机名的API
PB调用定义:
Function uLong Gethost(ref string hostname) Library "GetIP60.dll"
PB11.2调用定义:
Function uLong Gethost(ref string hostname) Library "GetIP60.dll" ALIAS FOR "Gethost;ansi"
调用方法
string ls_Host = space(256)
int result
result = Gethost(ls_Host)
if result =0 then
sle_1.text=trim(ls_Host)
end if
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -