Changeset 423 for trunk/Packages/Common/UCommon.pas
- Timestamp:
- Apr 25, 2022, 6:01:01 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/UCommon.pas
r420 r423 1 1 unit UCommon; 2 2 3 {$mode delphi}4 5 3 interface 6 4 7 5 uses 8 {$ ifdef Windows}Windows,{$endif}9 {$ ifdef Linux}baseunix,{$endif}6 {$IFDEF WINDOWS}Windows,{$ENDIF} 7 {$IFDEF UNIX}baseunix,{$ENDIF} 10 8 Classes, SysUtils, StrUtils, Dialogs, Process, LCLIntf, 11 9 FileUtil; //, ShFolder, ShellAPI; … … 35 33 DLLHandle1: HModule; 36 34 37 {$IFDEF W indows}35 {$IFDEF WINDOWS} 38 36 GetUserNameEx: procedure (NameFormat: DWORD; 39 37 lpNameBuffer: LPSTR; nSize: PULONG); stdcall; … … 302 300 end; 303 301 304 {$IFDEF W indows}302 {$IFDEF WINDOWS} 305 303 function GetUserName: string; 306 304 const … … 323 321 end; 324 322 end; 325 {$ endif}323 {$ENDIF} 326 324 327 325 function ComputerName: string; 328 {$ ifdef mswindows}326 {$IFDEF WINDOWS} 329 327 const 330 328 INFO_BUFFER_SIZE = 32767; … … 341 339 end; 342 340 end; 343 {$ endif}344 {$ ifdef unix}341 {$ENDIF} 342 {$IFDEF UNIX} 345 343 var 346 344 Name: UtsName; … … 349 347 Result := Name.Nodename; 350 348 end; 351 {$ endif}352 353 {$ ifdef windows}349 {$ENDIF} 350 351 {$IFDEF WINDOWS} 354 352 function LoggedOnUserNameEx(Format: TUserNameFormat): string; 355 353 const … … 429 427 procedure LoadLibraries; 430 428 begin 431 {$IFDEF W indows}429 {$IFDEF WINDOWS} 432 430 DLLHandle1 := LoadLibrary('secur32.dll'); 433 431 if DLLHandle1 <> 0 then … … 440 438 procedure FreeLibraries; 441 439 begin 442 {$IFDEF W indows}440 {$IFDEF WINDOWS} 443 441 if DLLHandle1 <> 0 then FreeLibrary(DLLHandle1); 444 442 {$ENDIF}
Note:
See TracChangeset
for help on using the changeset viewer.