想要很详细的 所有关联代码都带着的
解决方案 »
- 用vba 实现读取一个目录下的所有文件的数据并输出成文件
- 帮助!又有没有人知道这登录的密码?
- 关于vb中的资源编辑器释放问题
- Winsock加载问题
- 感谢Hassle来接分,CSDN高手还是多。(感谢贴,UP无分)
- 谁有文件上传的OCX控件?
- 在vb中要实现QQ的功能应使用哪方面的技术
- 大侠门。。pc如何在串口读数据??????
- 用什么函数可以将一个字符串、几个二进制码(如:101001010),实现移动?就如同c语言中的符号<<和>>一样的功能?
- 刷新屏幕的某个矩形区域???高分求解!!!
- 麻烦给个类似 搜索引擎 的思路
- Toolbar的tbrCheck样式下怎么让Value为按下时按钮无响应
Imports System.Diagnostics
Public Class MacAddress
Public Function GetMac(ByVal IP As String) As String
Dim str1 As String = String.Empty
Try
Dim str2 As String = String.Empty
Dim info1 As ProcessStartInfo = New ProcessStartInfo()
Dim process1 As Process = New Process() info1.FileName = "nbtstat"
info1.RedirectStandardInput = False
info1.RedirectStandardOutput = True
info1.Arguments = "-A " + IP
info1.UseShellExecute = False
process1 = Process.Start(info1) Dim num1 As Integer = -1 While (num1 <= -1)
num1 = str2.Trim().ToLower().IndexOf("mac address", 0)
If (num1 > -1) Then
Exit While
End If str2 = process1.StandardOutput.ReadLine()
process1.WaitForExit()
str1 = str2.Trim()
End While
Catch ex As Exception
Throw ex
End Try
Return str1
End Function