* added GuidCase function to intf/guid helper functions

git-svn-id: trunk@13234 -
This commit is contained in:
ivost 2009-06-05 14:36:43 +00:00
parent 9a9b05b683
commit b5be9e008e
2 changed files with 10 additions and 0 deletions

View File

@ -33,4 +33,5 @@ function Supports(const AClass: TClass; const IID: Shortstring): Boolean; overlo
function StringToGUID(const S: string): TGUID;
function GUIDToString(const GUID: TGUID): string;
function IsEqualGUID(const guid1, guid2: TGUID): Boolean;
function GuidCase(const GUID: TGUID; const List: array of TGuid): Integer;

View File

@ -145,6 +145,15 @@ begin
end;
function GuidCase(const GUID: TGUID; const List: array of TGuid): Integer;
begin
for Result := High(List) downto 0 do
if IsEqualGUID(GUID, List[Result]) then
Exit;
Result := -1;
end;
function GUIDToString(const GUID: TGUID): string;
begin
SetLength(Result, 38);