RAD Studio (Common)
ContentsIndex
PreviousUpNext
E2230: Methods of dispinterface types cannot specify directives (Delphi)

Methods declared in a dispinterface type cannot specify any calling convention directives.

program Produce;

  type
    IBase = dispinterface
    ['{00000000-0000-0000-0000-000000000000}']
      procedure yamadama; register;
    end;

begin
end.

The error in the example shown here is that the method 'yamadama' attempts to specify the register calling convention.

program Solve;

  type
    IBase = dispinterface
    ['{00000000-0000-0000-0000-000000000000}']
      procedure yamadama;
    end;

begin
end.

Since no dispinterface method can specify calling convention directives, the only solution to this problem is to remove the offending directive, as shown in this example.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!