Advertisement
C_Volume2 String Manipulation #72713

CurComputerName

Get the current computername from Windows

AI

ИИ-обзор: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Исходный код
original-source
' 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
Оригинальные комментарии (3)
Восстановлено из Wayback Machine