
Simple one: Retrieving the workstation's name
Hi,
simply use
Declare Function GetComputerName Lib "kernel32" Alias =
"GetComputerNameA"
(ByVal lpBuffer As String, nSize As Long) As Long
Dim sName As String
sName =3D Space$(255)
l =3D GetComputerName(sName, Len(sName))
i =3D InStr(sName, Chr$(0))
sName =3D Left(sName, i - 1)
Thomas Klein
Quote:
> -----Urspr=FCngliche Nachricht-----
> Ver=F6ffentlicht am: Freitag, 19. September 1997 20:44
> Im Ordner: networks
> Unterhaltung: Simple one: Retrieving the workstation's name
> Betreff: Simple one: Retrieving the workstation's name
>=20
> Hi:
>=20
> Could some post some sample code showing how to retrieve the
> workstation
> name of a Win95 PC using VB4?
>=20
>=20
> Thanks!
> Brian