首先需要添加对System.DirectoryServices名域空间的引用,定位到"项目->添加引用
->.NET->System.DirectoryServices.dll",添加上即可.下面是代码部分:
Dim MyString As String = "WinNT://" + System.Security.Principal.WindowsIdentity.GetCurrent().Name.Replace("\", "/") |
本文地址:http://com.8s8s.com/it/it45501.htm