Delphi Error – E2229 A dispinterface type requires an interface identification

Delphi Compiler Error

E2229 A dispinterface type requires an interface identification

Reason for the Error & Solution

When using dispinterface types, you must always be sure to include a GUID specification for them.

program Produce;

  type
    IBase = dispinterface
    end;

begin
end.

In the example shown here, the dispinterface type does not include a GUID specification, and thus causes the compiler to emit an error.

program Solve;

  type
    IBase = dispinterface
    ['{00000000-0000-0000-0000-000000000000}']

    end;

begin
end.

Ensuring that each dispinterface has a GUID associated with it will cause this error to go away.

Share:

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

Delphi Compiler Error E2313 Attribute – Known attribute cannot specify properties Reason for the Error & Solution No further information...
Delphi Compiler Error E2379 Virtual methods not allowed in record types Reason for the Error & Solution No further information...
Rodrigo , one of the long time Delphi Developer has been working on one of his personal project “Delphi IDE...