版权所有
作者: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
GetIP PB获取IP的DLL
5星 · 超过95%的资源 需积分: 50 38 浏览量
2009-05-13
08:34:30
上传
评论 1
收藏 48KB RAR 举报
今天的现在
- 粉丝: 4
- 资源: 3
最新资源
- 基于Python+FFmpeg的视频和音频的处理+剪辑+源码+开发文档+项目解析(高分优秀项目)
- 母亲节祝福html源码示例.pdf
- 基于51单片机DS1302实时时钟LCD1602显示
- (54节)视频号0粉起号课,逻辑梳理,技能提升,完整版-课程网盘链接提取码下载 .txt
- Mendix5-添加自定义逻辑
- 基于java的图片浏览小程序源码.zip
- 陈呵keyshot产品渲染第2期-课程网盘链接提取码下载 .txt
- 分层MPC控制器的实时车辆最优控制和避障Hierarchical MPC controller for real time ve
- 基于QT+C++实现微动背景,界面看似静态实则动态+源码
- 非线性弹簧质量系统的简单模型预测控制(MPC)Simple Model Predictive Control (MPC) for
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
- 1
- 2
- 3
- 4
- 5
- 6
前往页