SRL Archive - Development

[Plugin] Unable to register type T


Daniel

2012-01-26 07:04:02


[Error] (2:1): Unable to register type T

What the..?


function GetTypeInfo(X: Integer; var sType, sTypeDef: String): Integer;
stdcall; export;
begin
case X of
0:
begin
sType := 'TabCoef';
sTypeDef := 'array[0..9] of Extended;';
end;
1:
begin
sType := 'TVector';
sTypeDef := 'array of Extended;';
end;
2:
begin
sType := 'TMatrix';
sTypeDef := 'array of array of Extended;';
end;
else
X := -1;
end;

Result := X;
end;

I've also tried the type TExtendedArray as the base type, and also replaced the base type of TabCoef to 'array of Extended' and 'TExtendedArray'. Still get the same error :(

Please help?

nielsie95

2012-01-26 07:06:49

Seems like only the first letter gets passed; have you got longstrings enabled {$H+}?

Daniel

2012-01-26 07:10:26

Nope, but you mentioning strings made me realise the error. I'm using Delphi XE2… had to use AnsiChar instead of String (since Delphi converted to Unicode a couple of years ago) :(

Thank you! None the less! :)