×îÐÂÎÄÕÂ
¡¤¼Ì³ÐÓë½Ó¿Ú
¡¤¶à²ã½á¹¹À´¿ª·¢ASP.NE...
¡¤¸ÕдºÃµÄAsp.Netʱ¼ä...
¡¤Displaying Random Re...
¡¤Ò»¸ö¼ÓÇ¿µÄÎļþÉÏ´«£¨...
¡¤Asp.netÖд´½¨ºÍʹÓÃA...
¡¤Form code generator ...
¡¤Ê¹ÓÃC#½øÐеã¶ÔµãͨѶ...
¡¤¸ÕдºÃµÄAsp.Netʱ¼ä...
¡¤Ê¹ÓÃÉè¼ÆÄ£Ê½¹¹½¨Í¨ÓÃ...
¡¤×ª:Visual Basic.NET...
¡¤Ê¹Óà DataAdapter ºÍ ...
Ïà¹ØÎÄÕÂ
¡¤ÊýÖµ±ä»»Ê±µÄ¸ñʽ»¯×Ö...
¡¤Î¢ÈíµÄÔ¶³Ì´¦Àí¿ò¼Ü.N...
¡¤Visual C# .NET ÈëÃÅ
¡¤Ê¹Óú¯ÊýÍê³É±í¸ñÆæÅ¼...
¡¤ADO.NET¶ÔÏóµÄ¹¹Ôì(7)...
¡¤³£ÓõĶÁдiniÎļþµÄ...
¡¤¾­µäË®¾§±¨±íÉè¼Æ¡ª·Ö...
¡¤ºÙºÙ¡£ºÃ¶«Î÷ѽ¡£¡£¡£...
¡¤Êó±êÒÆ¶¯£¬¸Ä±ädatagr...
¡¤VB.Netѧϰ±Ê¼Ç£¨Ñ­»·...
¡¤ÈçºÎÓÃC#½«Êý¾Ý¿âÖеÄ...
¡¤ÀûÓÃWSE ¼ÓÃÜSOAP±¨ÎÄ...
ÍÆ¼öÎÄÕÂ
¡¤ÔÚASP.NETÖлñÈ¡Îļþ...
¡¤ÎÒ½«´Ë·½·¨ÒÆÖ²µ½VB.N...
¡¤UML¸¨ÖúÍøÕ¾¹æ»®ºÍÉè...
¡¤.NET ÖеĶÔÏóÐòÁл¯
¡¤ÓÃC#Éè¼ÆÒ»¸öÃüÁîÐз½...
¡¤C#µÚÁù¿Î:C#µÄÃû³Æ¿Õ...
¡¤½áºÏsingletonºÍÏß³Ì...
¡¤VB.NET²Ù×÷SQL Server...
¡¤´´½¨ºÍʹÓò»¶¨ÊýÄ¿²Î...
¡¤MSHFlexGrid1ʹÓü¼ÇÉ...
¡¤C# 2.0 Specification...
¡¤¶¯Ì¬¼ÓÔØ·þÎñÆ÷¿Ø¼þ£¨...
  ÄúÏÖÔÚµÄλÖ㺠ÐÝÏоӠ>> ÍøÂçѧԺ >> ÍøÂç±à³Ì >> .NET¿ª·¢ >> 

get the mac Address
  ÈËÆø£º ¡¾×ÖÌ壺´ó ÖРС¡¿
  ·¢²¼Ê±¼ä£º2004-12-29 00:25:19

'The DotNet world is so beautiful.
'Enjoy the code below
Public Function ValueSepR(ByVal RawString As String, ByVal SepChar As String) As String
        If InStr(1, RawString, SepChar) <> 0 ThenÐÝ ÏÐ ¾Ó ±à ¼­
            ValueSepR = Microsoft.VisualBasic.Right(RawString, Len(RawString) - InStr(1, RawString, SepChar))
        Else
            ValueSepR = RawString
        End If

    End Function
    Public Function GetMac(ByVal IP As String) As String
        Try
            Dim dirResults As String
            Dim psi As ProcessStartInfo = New ProcessStartInfo()
            Dim proc As New Process()
            psi.FileName = "nbtstat"
            psi.RedirectStandardInput = False
            psi.RedirectStandardOutput = True
            psi.Arguments = "-A " & IP
            psi.UseShellExecute = False
            proc = Process.Start(psi)
            Dim x As Integer = -1
            Do Until x > -1
                If dirResults <> Nothing Then
                    x = dirResults.Trim.ToLower.IndexOf("mac address", 0)
                    If x > -1 Then
                        Exit Do
                    End If
                End If
                dirResults = proc.StandardOutput.ReadLine
            Loop
            proc.WaitForExit()
            GetMac = ValueSepR(dirResults.Trim, "=").Trim
        Catch err As Exception
            MsgBox(err.Message & err.StackTrace)
        End Try
    End Function

¡Ô ²é¿´¡¢·¢±íÆÀÂÛ ¡Ô