Scalabium Software

SMExport advertising
Knowledge for your independence'.
Home Delphi and C++Builder tips


#27: The current computer and user names

To get a computer and user name you can so:

var ComputerName: array[1..20] of Char;
     UserName: array[1..512] of Char;
    arrSize: DWord;
begin
  arrSize := SizeOf(ComputerName);
  GetComputerName(@ComputerName, arrSize);

  arrSize := SizeOf(UserName);
  GetUserName(@UserName, arrSize);

  ShowMessage('Computer name is: ' + ComputerName + #13#10 +
                        'User name is: ' + UserName)
end;


Published: October 1, 1999

See also
 
ExcelFile Viewer
Paradox ActiveX
Viewer for TNEF-files (winmail.dat)
Clarion Viewer
SMImport suite
Metafile Convert
Word Web-stream
DBExport tools
ABA Picture Convert
ABA Spreadsheet Convert
 
 


Contact to webmaster

 

Borland Software Code Gear Scalabium Delphi tips

Copyright© 1998-2023, Scalabium Software. All rights reserved.
webmaster@scalabium.com

SMExport/SMImport suites