求问如何用 VB 实现获取本地计算机所有的用户
求各位大神
Public Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long Public Function UserName() As String Dim buffer As String * 512, Length As Long If GetUserName(buffer, Len(buffer)) Then Length = InStr(buffer, vbNullChar) - 1 ComputerUserName = Left$(buffer, Length) End If End Function