Changeset 112 for trunk/Packages
- Timestamp:
- Feb 15, 2022, 9:42:57 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/UCommon.pas
r109 r112 310 310 end; 311 311 312 {$IFDEF W indows}312 {$IFDEF WINDOWS} 313 313 function GetUserName: string; 314 314 const … … 318 318 begin 319 319 L := MAX_USERNAME_LENGTH + 2; 320 Result := Default(string); 320 321 SetLength(Result, L); 321 322 if Windows.GetUserName(PChar(Result), L) and (L > 0) then begin … … 331 332 end; 332 333 end; 333 {$ endif}334 {$ENDIF} 334 335 335 336 function ComputerName: string; 336 {$ ifdef mswindows}337 {$IFDEF WINDOWS} 337 338 const 338 339 INFO_BUFFER_SIZE = 32767; … … 349 350 end; 350 351 end; 351 {$ endif}352 {$ ifdef unix}352 {$ENDIF} 353 {$IFDEF UNIX} 353 354 var 354 355 Name: UtsName; … … 358 359 Result := Name.Nodename; 359 360 end; 360 {$ endif}361 362 {$ ifdef windows}361 {$ENDIF} 362 363 {$IFDEF WINDOWS} 363 364 function LoggedOnUserNameEx(Format: TUserNameFormat): string; 364 365 const … … 438 439 procedure LoadLibraries; 439 440 begin 440 {$IFDEF W indows}441 {$IFDEF WINDOWS} 441 442 DLLHandle1 := LoadLibrary('secur32.dll'); 442 443 if DLLHandle1 <> 0 then … … 449 450 procedure FreeLibraries; 450 451 begin 451 {$IFDEF W indows}452 {$IFDEF WINDOWS} 452 453 if DLLHandle1 <> 0 then FreeLibrary(DLLHandle1); 453 454 {$ENDIF}
Note:
See TracChangeset
for help on using the changeset viewer.