如何通过VB获取网卡地址
日期:2007年5月1日 作者: 查看:[大字体 中字体 小字体]-
程序语言] Microsoft Visual Basic 4.0,5.0,6.0
[运行平台] WINDOWS
[源码来源] http://support.microsoft.com/support/kb/articles/q175/4/72.asp?FR=0
[功能描述] IPX和NETBIOS接口需要网络地址。该文通过详细的步骤演示了如何通过VB获取网卡地址。步骤:
1)在Visual Basic生成标准的EXE文件。缺省创建 Form1。
2)在Form1中添加一命令按钮,缺省名为Command1。
3)把下列代码放到Form1中说明部分。Option Explicit
Private Const NCBASTAT = &H33
Private Const NCBNAMSZ = 16
Private Const HEAP_ZERO_MEMORY = &H8
Private Const HEAP_GENERATE_EXCEPTIONS = &H4
Private Const NCBRESET = &H32Private Type NCB
ncb_command As Byte Integer
ncb_retcode As Byte Integer
ncb_lsn As Byte Integer
ncb_num As Byte Integer
ncb_buffer As Long String
ncb_length As Integer
ncb_callname As String * NCBNAMSZ
ncb_name As String * NCBNAMSZ
ncb_rto As Byte Integer
ncb_sto As Byte Integer
ncb_post As Long
ncb_lana_num As Byte Integer
ncb_cmd_cplt As Byte Integer
ncb_reserve(9) As Byte Reserved, must be 0
ncb_event As Long
End TypePrivate Type ADAPTER_STATUS
adapter_address(5) As Byte As String * 6
rev_major As Byte Integer
reserved0 As Byte Integer
adapter_type As Byte Integer
rev_minor As Byte Integer
duration As Integer
frmr_recv As Integer
frmr_xmit As Integer
iframe_recv_err As Integer
xmit_aborts As Integer
xmit_success As Long
recv_success As Long
iframe_xmit_err As Integer
recv_buff_unavail As Integer
t1_timeouts As Integer
ti_timeouts As Integer
Reserved1 As Long
free_ncbs As Integer
max_cfg_ncbs As Integer
max_ncbs As Integer
xmit_buf_unavail As Integer
max_dgram_size As Integer
pending_sess As Integer
max_cfg_sess As Integer
max_s As Integer
max_sess_pkt_size As Integer
name_count As Integer
End Type - [1] [2] [3] 下一页
-
- 如何通过VB获取网卡地址 相关文章:
- ·如何通过VB获取网卡地址
- 如何通过VB获取网卡地址 相关软件
- 特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作
- 者.文章版权归文章原始作者所有.对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转
- 载的文章有版权问题请联系编辑人员,我们尽快予以更正. 转载请注明来源:http://www.hackhome.com
上一篇:用VB6设计有趣的动画场景
下一篇:VB制作图片浏览器
精品推荐
热点TOP10
- ·VB表格控件总览与例程分析
- ·VB+Access设计图书管理系统
- ·用VB6.0制作画图板
- ·给VB控件PictureBox加滚动条的方法
- ·VB编程之路-如何让界面美化
- ·用MsFlexGrid控件显示数据库中的记录
- ·如何用VB程序来播放WAV文件
- ·CreatePolygonRgn
- ·用VB实现井字游戏
- ·利用硬盘序列号计算软件注册码
- ·串口通讯及其在VB平台下的实现
- ·VB中用Multimedia MCI控件开发多媒体应用
- ·在VFP、VB应用程序中激活鼠标功能
- ·VB.NET实现窗体图标最小化到状态栏
- ·VB 9新特性—保留与舍去了什么?
- ·VB基础学习:编码规范
- ·VB设计有语音报时和报警功能的闹钟
- ·用VB6分离出文本框的单词
- ·用VB实现Win2000用户限时登录
- ·VB应用程序中实现“查找和替换”功能
特别推荐
- ·VB表格控件总览与例程分析
- ·用VB6.0制作画图板
- ·VB打造超酷个性化菜单(六)
- ·MSHFlexGrid 控件的应用
- ·Visual Basic 控件简介
- ·利用硬盘序列号计算软件注册码
- ·计算机等级考试二级VB常用算法:排序
- ·用diskid.dll和disk32.dll获得硬盘序列号
- ·VB6中使用Winsock穿越各种代理的实现
- ·在VFP、VB应用程序中激活鼠标功能
- ·vb基础(打印问题)
- ·想用就用,VB基础代码
- ·运用多媒体WAV文件格式二三例
- ·VB基础学习:编码规范
- ·VB实现程序的隐形
- ·使用.NET Framework从VB6中访问事件日志
- ·怎样把VC++代码转换成VB代码
- ·如何用VB程序来播放WAV文件
- ·VB 实用函数集
- ·用VB制作RM压缩软件
