• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号
您的位置:首页 > 程序设计 >ASP > 在ASP中用组件检测当前网卡地址的代码

在ASP中用组件检测当前网卡地址的代码

作者: 字体:[增加 减小] 来源:互联网 时间:2017-05-11

通过本文主要向大家介绍了asp无组件上传,asp上传组件,asp无组件上传图片,艾恩asp无组件上传,asp无组件批量上传等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
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 = &H32

   Private 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 Type
   Private 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_sess As Integer
        max_sess_pkt_size As Integer
        name_count As Integer
   End Type
   Private Type NAME_BUFFER
        name  As String * NCBNAMSZ
        name_num As Integer
        name_flags As Integer
   End Type
   Private Type ASTAT
        adapt As ADAPTER_STATUS
        NameBuff(30) As NAME_BUFFER
   End Type

   Private Declare Function Netbios Lib "netapi32.dll" _
           (pncb As NCB) As Byte
   Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" ( _
           hpvDest As Any, ByVal hpvSource As Long, ByVal cbCopy As Long)
   Private Declare Function GetProcessHeap Lib "kernel32" () As Long
   Private Declare Function HeapAlloc Lib "kernel32" _
           (ByVal hHeap As Long, ByVal dwFlags As Long, _
           ByVal dwBytes As Long) As Long
   Private Declare Function HeapFree Lib "kernel32" (ByVal hHeap As Long, _
           ByVal dwFlags As Long, lpMem As Any) As Long

Public Function GetMACAddress(sIP As String) As String
    Dim sRtn As String
    Dim myNcb As NCB
    Dim bRet As Byte

    Dim aIP() As String
    Dim x As Long
    Dim nIP As String

    If InStr(sIP, ".") = 0 Then
       GetMACAddress = "无效的IP地址."
       Exit Function
    End If

    aIP = Split(sIP, ".", -1, vbTextCompare)
    If UBound(aIP()) <> 3 Then
       GetMACAddress = "无效的IP地址."
       Exit Function
    End If

    For x = 0 To UBound(aIP())
        If Len(aIP(x)) > 3 Then
           GetMACAddress = "无效的IP地址"
           Exit Function
        End If

     
分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • ASP脚本组件实现服务器重启
  • ASP无组件分页实现思路及代码
  • ASP wsImage组件添加水印的实用代码
  • 手写个小组件(组件入门)asp版
  • asp无组件生成验证码 GIF图片格式
  • asp中判断服务器是否安装了某种组件的函数
  • ASP分页类(支持多风格变换)
  • Asp无组件生成缩略图的代码
  • Asp无组件上传进度条解决方案
  • asp代码实现检测组件是否安装的函数

相关文章

  • 2017-05-11asp实现一个统计当前在线用户的解决方案
  • 2017-05-11RESPONSE.WRITE和&lt;%=%的区别
  • 2017-05-11ASP中Request对象获取客户端数据的顺序(容易忽略)
  • 2017-05-11ASP XML操作类代码
  • 2017-05-11asp中utf8不会出现乱码的写法
  • 2017-05-11[转]XMLHTTPRequest的属性和方法简介
  • 2017-05-11pjblog中清空引用的小程序
  • 2017-05-11使用FSO把文本信息导入数据库
  • 2017-05-11ASP开发中存储过程应用全接触
  • 2017-05-11解决ASP中http状态跳转返回错误页的问题

文章分类

  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号

最近更新的内容

    • ASP中不用模板生成HTML静态页面的方法
    • 一个ACCESS数据库访问的类第1/3页
    • asp下几种常用排序算法
    • VBScript ASP CDbl() 函数转换为双精度类型
    • 通过MSXML2自动获取QQ个人头像及在线情况(给初学者)
    • SmartHTTP 简易HttpRequest类(ASP)
    • asp中cint与clng的区别分析
    • 多域名绑定到一个空间访问不同首页的技巧
    • ASP 连接 SQL SERVER 2008的方法
    • asp 字符串截取函数

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有