国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

獲取本地計算機和其他計算機的MAC值的方法

2019-11-18 12:02:17
字體:
來源:轉載
供稿:網友

  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 System.Diagnostics.ProcessStartInfo = New System.Diagnostics.ProcessStartInfo()
  Dim proc As New System.Diagnostics.Process()
  psi.FileName = "nBTstat"
  psi.RedirectStandardInput = False
  psi.RedirectStandardOutput = True
  psi.Arguments = "-A " & IP
  psi.UseShellExecute = False
  proc = System.Diagnostics.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
  Response.Write(err.Message & err.StackTrace)
  End Try
  End Function

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 凉山| 泾源县| 正阳县| 龙井市| 门源| 延安市| 远安县| 澄城县| 灵寿县| 肇州县| 上虞市| 成武县| 韶山市| 崇仁县| 曲沃县| 同心县| 兖州市| 郯城县| 大丰市| 大关县| 油尖旺区| 郧西县| 西平县| 忻州市| 米林县| 蚌埠市| 五峰| 毕节市| 萍乡市| 长武县| 双江| 屏东县| 临夏县| 江都市| 浠水县| 万载县| 孝昌县| 都匀市| 刚察县| 鸡泽县| 措勤县|