README.md

December 4, 2022 ยท View on GitHub

CurComputerName

Description

Get the current computername from Windows

More Info

sTmp1$ = CurComputerName()

( The current computername from Windows )

sTmp1$ = "MORTAL OBSESSiON"

Submitted On
ByMAGiC MANiAC^mTo
LevelAdvanced
User Rating5.0 (10 globes from 2 users)
CompatibilityVB 5.0, VB 6.0
CategoryString Manipulation
WorldVisual Basic
Archive File

Source Code

' Get the current computername from Windows
' Coded By MAGiC MANiAC^mTo
' More Examples At: http://home.kabelfoon.nl/~mto/
'
Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" _ (ByVal lpBuffer$, nSize As Long) As Long
Function CurComputerName$()
 Dim sTmp1$
 sTmp1 = Space$(512)
 GetComputerName sTmp1, Len(sTmp1)
 CurComputerName = Trim$(sTmp1)
End Function