How do you initialise a const array of TGUID from Interface type data, in Delphi?

后端 未结 7 748
谎友^
谎友^ 2020-12-18 00:43

I want to initialise an array like this -

Const MyArray : Array[0..0] Of TGUID = (IInterface);

But it results in -

[DCC Err         


        
7条回答
  •  -上瘾入骨i
    2020-12-18 01:35

    Another idea: The following compiles:

    procedure Blah(const MyArray: array of TGUID);
    begin
      //...
    end;
    
    Blah([IInterface, IDispatch]);
    

    Maybe you can use this approach.

提交回复
热议问题