Asp.Net获取本地计算机和其他计算机的MAC值的方法


所属类别:.NET

文章作者:未知

特别推荐:免费发布信息 承包关键词~~抢爆了!HOT!


转自:http://www.guoblog.com/blogview.asp?logID=202PublicFunctionValueSepR(ByValRawStringAsString,ByValSepCharAsString)AsStringIfInStr(1,RawString,SepChar)<>0ThenValueSepR=Microsoft.VisualBasic.Right(RawString,Len(RawString)-InStr(1,RawString,SepChar))ElseValueSepR=RawStringEndIfEndFunctionPublicFunctionGetMac(ByValIPAsString)AsStringTryDimdirResultsAsStringDimpsiAsSystem.Diagnostics.ProcessStartInfo=NewSystem.Diagnostics.ProcessStartInfo()DimprocAsNewSystem.Diagnostics.Process()psi.FileName="nbtstat"psi.RedirectStandardInput=Falsepsi.RedirectStandardOutput=Truepsi.Arguments="-A"&IPpsi.UseShellExecute=Falseproc=System.Diagnostics.Process.Start(psi)DimxAsInteger=-1DoUntilx>-1IfdirResults<>NothingThenx=dirResults.Trim.ToLower.IndexOf("macaddress",0)Ifx>-1ThenExitDoEndIfEndIfdirResults=proc.StandardOutput.ReadLineLoopproc.WaitForExit()GetMac=ValueSepR(dirResults.Trim,"=").TrimCatcherrAsExceptionResponse.Write(err.Message&err.StackTrace)EndTryEndFunction关闭本页

相关信息

· 让你的Linux内核重编译之路走得更通畅

· Linux 守护进程的编程方法

· CFont的问题和一个郁闷我两天的Commobox背景色的问题

· 在ASP/ASP.NET中处理客户端数字证书








....

9902 86493