Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, _  nSize As Long) As Long
  Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" _
怎样恢复聊天已删的记录
  (ByVal lpBuffer As String, _好听的流行歌曲
  nSize As Long) As Long
  Sub Get_Computer_Name()
  ’获得当前的机器名称
  Dim Comp_Name_B As String * 255
  Dim Comp_Name As String
  GetComputerName Comp_Name_B, Len(Comp_Name_B)
  Comp_Name = Left(Comp_Name_B, InStr(Comp_Name_B, Chr(0)))
  MsgBox "您正在使⽤的这台机器名为:" & Comp_Name, vbOKOnly, "WINAK"
阎娜的胸围多大  End Sub
  Sub Get_User_Name()
  ’获得当前⽤户名
    Dim lpBuff As String * 25
小年祝福语6个字  Dim ret As Long, UserName As String
  ret = GetUserName(lpBuff, 25)
  UserName = Left(lpBuff, InStr(lpBuff, Chr(0)) - 1)
    MsgBox "当前⽤户名:" & UserName, vbOKOnly, "WINAK"
  End Sub获取IP地址
  1、局域内IP地址及卡MAC地址
  Sub IP()采购师报名
  strComputer = "."
  Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
  Set IPConfigSet = objWMIService.ExecQuery _
  ("Select * from Win32_NetworkAdapterConfiguration ")
  For Each IPConfig In IPConfigSet
  On Error Resume Next
  s = ""集成显卡独立显卡有什么区别
  s = s & "Description: " & IPConfig.Description & vbCrLf
    ss = ""
    For i = LBound(IPConfig.IPAddress) To UBound(IPConfig.IPAddress)
     ss = ss & IPConfig.IPAddress(i) & " "
    Next
  s = s & "IPAddress: " & ss & vbCrLf
  s = s & "MACAddress: " & IPConfig.MACAddress & vbCrLf
  MsgBox s
  Next
  End Sub