First of all, thanks for your reply

Well, yes, I compile in Delphi compatibility mode. The error I obtain:
DXTypes.pas(74,1) Internal error 200310221

Could be a bug in the compiler?