Changeset 123
- Timestamp:
- Jan 5, 2011, 4:18:16 PM (14 years ago)
- Files:
-
- 4 added
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/Common.lpk
r118 r123 4 4 <PathDelim Value="\"/> 5 5 <Name Value="Common"/> 6 <Author Value="Chronos"/> 6 7 <CompilerOptions> 7 8 <Version Value="9"/> 8 9 <PathDelim Value="\"/> 9 10 <SearchPaths> 10 <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS) \"/>11 <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 11 12 </SearchPaths> 12 13 <Other> … … 14 15 </Other> 15 16 </CompilerOptions> 17 <Description Value="Various libraries"/> 18 <License Value="GNU/GPL"/> 19 <Version Minor="1"/> 16 20 <Files Count="5"> 17 21 <Item1> … … 37 41 </Files> 38 42 <Type Value="RunAndDesignTime"/> 39 <RequiredPkgs Count=" 2">43 <RequiredPkgs Count="3"> 40 44 <Item1> 41 <PackageName Value=" LCL"/>45 <PackageName Value="TemplateGenerics"/> 42 46 </Item1> 43 47 <Item2> 48 <PackageName Value="LCL"/> 49 </Item2> 50 <Item3> 44 51 <PackageName Value="FCL"/> 45 52 <MinVersion Major="1" Valid="True"/> 46 </Item 2>53 </Item3> 47 54 </RequiredPkgs> 48 55 <UsageOptions> -
Common/UCommon.pas
r31 r123 4 4 5 5 uses 6 Windows, SysUtils, ShFolder, ShellAPI;6 Windows, Classes, SysUtils, SpecializedList; //, ShFolder, ShellAPI; 7 7 8 8 type … … 10 10 TArrayOfString = array of string; 11 11 12 function DelTree(DirName : string): Boolean; 12 TUserNameFormat = ( 13 unfNameUnknown = 0, // Unknown name type. 14 unfNameFullyQualifiedDN = 1, // Fully qualified distinguished name 15 unfNameSamCompatible = 2, // Windows NT® 4.0 account name 16 unfNameDisplay = 3, // A "friendly" display name 17 unfNameUniqueId = 6, // GUID string that the IIDFromString function returns 18 unfNameCanonical = 7, // Complete canonical name 19 unfNameUserPrincipal = 8, // User principal name 20 unfNameCanonicalEx = 9, 21 unfNameServicePrincipal = 10, // Generalized service principal name 22 unfDNSDomainName = 11); 23 24 13 25 function IntToBin(Data: Cardinal; Count: Byte): string; 14 26 function TryHexToInt(Data: string; var Value: Integer): Boolean; 15 27 function TryBinToInt(Data: string; var Value: Integer): Boolean; 16 function GetSpecialFolderPath(Folder: Integer): string; 28 //function DelTree(DirName : string): Boolean; 29 //function GetSpecialFolderPath(Folder: Integer): string; 17 30 function BCDToInt(Value: Byte): Byte; 18 31 function CompareByteArray(Data1, Data2: TArrayOfByte): Boolean; 19 32 function GetUserName: string; 33 function LoggedOnUserNameEx(Format: TUserNameFormat): string; 20 34 function SplitString(var Text: string; Count: Word): string; 21 35 function GetBit(Variable: QWord; Index: Byte): Boolean; … … 27 41 implementation 28 42 29 function DelTree(DirName : string): Boolean;43 (*function DelTree(DirName : string): Boolean; 30 44 var 31 45 SHFileOpStruct : TSHFileOpStruct; … … 49 63 Result := False; 50 64 end; 51 end; 65 end;*) 52 66 53 67 function BCDToInt(Value: Byte): Byte; … … 56 70 end; 57 71 58 function GetSpecialFolderPath(Folder: Integer): string;72 (*function GetSpecialFolderPath(Folder: Integer): string; 59 73 const 60 74 SHGFP_TYPE_CURRENT = 0; … … 67 81 else 68 82 Result := ''; 69 end; 83 end;*) 70 84 71 85 function IntToBin(Data: Cardinal; Count: Byte): string; … … 158 172 end; 159 173 174 procedure GetUserNameEx(NameFormat: DWORD; 175 lpNameBuffer: LPSTR; nSize: PULONG); stdcall; 176 external 'secur32.dll' Name 'GetUserNameExA'; 177 178 179 function LoggedOnUserNameEx(Format: TUserNameFormat): string; 180 var 181 UserName: array[0..250] of Char; 182 Size: DWORD; 183 begin 184 Size := 250; 185 GetUserNameEx(Integer(Format), @UserName, @Size); 186 Result := UTF8Encode(UserName); 187 end; 188 160 189 function SplitString(var Text: string; Count: Word): string; 161 190 begin -
PinConnection/PinConnection.lpk
r119 r123 4 4 <PathDelim Value="\"/> 5 5 <Name Value="PinConnection"/> 6 <Author Value="Chronos"/> 6 7 <CompilerOptions> 7 8 <Version Value="9"/> 8 9 <PathDelim Value="\"/> 9 10 <SearchPaths> 10 <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS) \"/>11 <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 11 12 </SearchPaths> 12 13 <Other> … … 14 15 </Other> 15 16 </CompilerOptions> 17 <Description Value="System for class bidirectional communication interconnection."/> 18 <License Value="GNU/GPL"/> 19 <Version Minor="1"/> 16 20 <Files Count="9"> 17 21 <Item1>
Note:
See TracChangeset
for help on using the changeset viewer.