//--------------------------------------------------------------------------- #include #include // --------------------------------------------------------------------------- UnicodeString __fastcall TForm1::ComputerName(void) { UnicodeString ret; DWORD Size = MAX_COMPUTERNAME_LENGTH + 1; wchar_t Nazwa[MAX_COMPUTERNAME_LENGTH + 1]; Nazwa[0] = '\0'; GetComputerName(Nazwa, &Size); if (Nazwa[0] != '\0') ret = UnicodeString(Nazwa); else ret = UnicodeString("\."); return (ret); } // ---------------------------------------------------------------------------