GetIpAddrTable函数的用法

IP助手函数里面能找到的。(mmsdn中ip   helper函数族)  
  另外这些函数还包括网卡的一些设置。  
  增加一个IP地址。  
  。。。很多呀  
  下面这个函数是得到一个数组的。  
  GetIpAddrTable  
   
  The   GetIpAddrTable   function   retrieves   the   interface–to–IP   address   mapping   table.  
   
   
  DWORD   GetIpAddrTable(  
      PMIB_IPADDRTABLE   pIpAddrTable,  
      PULONG   pdwSize,  
      BOOL   bOrder  
  );  
   
  Parameters  
  pIpAddrTable    
  [out]   Pointer   to   a   buffer   that   receives   the   interface–to–IP   address   mapping   table   as   a   MIB_IPADDRTABLE   structure.    
  pdwSize    
  [in,   out]   On   input,   specifies   the   size   of   the   buffer   pointed   to   by   the   pIpAddrTable   parameter.    
  On   output,   if   the   buffer   is   not   large   enough   to   hold   the   returned   mapping   table,   the   function   sets   this   parameter   equal   to   the   required   buffer   size.  
   
  bOrder    
  [in]   Specifies   whether   the   returned   mapping   table   should   be   sorted   in   ascending   order   by   IP   address.   If   this   parameter   is   TRUE,   the   table   is   sorted.    
  Return   Values  
  If   the   function   succeeds,   the   return   value   is   NO_ERROR.  
   
  If   the   function   fails,   the   return   value   is   one   of   the   following   error   codes.  
   
  Return   Code   Description    
  ERROR_INSUFFICIENT_BUFFER   The   buffer   pointed   to   by   the   pIpAddrTable   parameter   is   not   large   enough.   The   required   size   is   returned   in   the   DWORD   variable   pointed   to   by   the   pdwSize   parameter.    
  ERROR_INVALID_PARAMETER   The   pdwSize   parameter   is   NULL,   or   GetIpAddrTable   is   unable   to   write   to   the   memory   pointed   to   by   the   pdwSize   parameter.    
  ERROR_NOT_SUPPORTED   This   function   is   not   supported   on   the   operating   system   in   use   on   the   local   system.    
  Other   Use   FormatMessage   to   obtain   the   message   string   for   the   returned   error.
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值