1 頁 (共 1 頁)

Get Network card MAC address (support Multi Networks)

發表於 : 2014-09-23, 11:51
admin
以下範例示範取得網卡 MAC Address 資料:
It's compile use BCC55 and Free!

代碼: 選擇全部

#INCLUDE "FIVEWIN.CH" 
Func    Test() 
Local   aNet      := {},; 
        nI        := 0 

        msgInfo( "Test Begin..." ) 
        aNet := GetMacAddress() 
        msgInfo( "Test OK" ) 
        If Len(aNet) > 0 
           MsgInfo( "You have:["+Str( Len(aNet), 2, 0 )+"] Network Cards!" ) 
           For nI := 1 To Len(aNet) 
               cStr := [] 
               cStr += [Card Num:]+Str(nI,2,0)+CRLF 
               cStr += [Desc:]+aNet[nI,1]+CRLF 
               cStr += [Mac Address:]+aNet[nI,2]+CRLF 
               msgInfo( cStr, "Your Network Cards" ) 
           Next nI 
        Else 
           Tone( 1000, 1 ) 
           MsgStop( "No any Network Card!!" ) 
        EndIf 
Return  NIL