I want to initialise an array like this -
Const MyArray : Array[0..0] Of TGUID = (IInterface);
But it results in -
[DCC Err
You could write a function to return your array of GUIDs. (I use this technique for constant date values.)
You have the choice of returning a dynamic or fixed size array.
Option 1
type
TGUIDArray = array of TGUID;
function GetMyInterfaces: TGUIDArray;
begin
SetLength(Result, 2);
Result[0] := IMyInterface1;
Result[1] := IMyInterface2;
end;
Option 2
type
TGUIDArray = array[0..1] of TGUID;
function GetMyInterfaces: TGUIDArray;
begin
Result[0] := IMyInterface1;
Result[1] := IMyInterface2;
end;