Windows - Nome Computer






' nome computer


Private Declare Function GetComputerName Lib "kernel32" _
Alias "GetComputerNameA" (ByVal sBuffer As String, lSize As Long) As Long

Function getNomeComputer()
Dim strString As String
Dim lunghezzaStringa As Long
lunghezzaStringa = 32 'La lunghezza massima del nome di un computer dovrebbe essere 31 caratteri
strString = String(lunghezzaStringa, " ")
GetComputerName strString, lunghezzaStringa
strString = Left(strString, lunghezzaStringa)
getNomeComputer = strString
End Function










( windowsnomecomputer.html )- by Paolo Puglisi - Modifica del 17/12/2023