当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

 ·一个很弱的问题    »显示摘要«
    摘要: 我单位系一个集团公司子网的一部分,通过dhcp获取ip 我用win2000的共享接入公司的局域网,内部用一个交换机连接其他的机器,其他的机器通过我的win2000的机器上网,怎么设置啊·谢谢了!· ......
    摘要: rt, ......


怎样将字符串转化成mac地址类型

如   字符串"aaaaaaaaaaaa"转化为类似  
  DWORD   SendARP(  
      IPAddr   DestIP,           //   destination   IP   address  
      IPAddr   SrcIP,             //   IP   address   of   sender  
      PULONG   pMacAddr,       //   returned   physical   address  
      PULONG   PhyAddrLen     //   length   of   returned   physical   addr.  
  );  
  中   PULONG   pMacAddr,类型。谢谢  
   
  比较急     分不够还有

NO.1   作者: yjh1982

用api嘛

NO.2   作者: antijpn

这个是我写的,应该没有问题  
  char   MacAddr[]="005345000000";  
  char   *pBuf=MacAddr;  
  char   *Addr=pMacAddr;  
  char   temp=0;  
  for(int   i=0;i<6;i++)  
  {  
  temp=0;  
  if(*pBuf>=0x30&&(*pBuf)<=0x39)  
  temp=(*pBuf-0)*16;  
  else  
  if(*pBuf>0x40&&(*pBuf)<0x47)  
  temp=(*pBuf-31)*16;  
  else  
  if(*pBuf>0x60&&(*pBuf)<0x67)  
  temp=(*pBuf-87)*16;  
  pBuf++;  
   
  if(*pBuf>=0x30&&(*pBuf)<=0x39)  
  temp=temp+(*pBuf-0);  
  else  
  if(*pBuf>0x40&&(*pBuf)<0x47)  
  temp+=(*pBuf-31);  
  else  
  if(*pBuf>0x60&&(*pBuf)<=0x67)  
  temp+=(*pBuf-87);  
  pBuf++;  
  *Addr=temp;  
  Addr++;  
  }

NO.3   作者: 5956

up


 ·很有趣也很溫馨    »显示摘要«
    摘要: 要不要我幫忙 甲乙兩人交往甚久,都已經到了論及婚嫁的年齡了, 男方卻怎樣都沒表示. 女友心開始急了,可是偏偏甲是內向又古意的人, 她只能在心裡幻想,幻想甲有一天突然開竅了, 拿著一束玫瑰和一枚鑽戒,跪在月光下向她求婚 一天,甲靜靜的問乙: 妳會擔心自己嫁不出去嗎? 乙想想,好像有點不安: 好像會耶~ 甲還是那個沉靜思文不慌不忙的問: 那要不要我幫忙? 就醬子...乙嫁給了甲! .......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE