VB辅导:取得网卡序列号

文章作者 100test 发表时间 2007:09:06 12:01:17
来源 100Test.Com百考试题网


  很多软件以取得网卡地址作为license验证,这不失为一个验证合法用户的好办法,不过要付出回复用户电话、传真的代价哦 

  将下面这段代码拷贝到程序中,然后在你的程序需要的时候调用ethernetaddress(0),该函数返回的字符串就是您机器上网卡的以太序列号。
  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

   ncb_retcode as byte

   ncb_lsn as byte

   ncb_num as byte

   ncb_buffer as long

   ncb_length as integer

   ncb_callname as string * ncbnamsz

   ncb_name as string * ncbnamsz

   ncb_rto as byte

   ncb_sto as byte

   ncb_post as long

   ncb_lana_num as byte

   ncb_cmd_cplt as byte

   ncb_reserve(9) as byte ’’ reserved, must be 0

   ncb_event as long

  end type


相关文章


用VB6轻松实现图片旋转
VB与VC混合编程中处理消息的方法
用VB为软件增加注册功能
用vb编写抽奖程序
VB辅导:取得网卡序列号
计算机等级考试四级最后一考报名
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛