You are not logged in.
Pages: 1
In our interfaces we are using types kind of "set of TMyEnumeration". Is it possible allow enumerations with more than 32 members in it?
Unfortunatly in such cases an exception is thrown at TInterfaceFactory.Create method.
EInterfaceFactoryException: TInterfaceFactoryRTTI.Create: TMyImplementation set invalid SizeInStorage=0 in IMyInterface.MyMethod method AMyEnum parameter
Some workouround would help:
function TEnumType.SizeInStorageAsSet: Integer;
begin
case MaxValue of
0..7: result := 1;
8..15: result := 2;
16..31: result := 4;
32..63: result := 8; // <--- added
else result := 0;
end;
end;
Is there a reason for limiting? We are using Delphi 10.3 Update 1.
Thanks in advance.
Offline
IIRC the serialization may use a PtrInt integer for serialization as number.
So I guess your modification may not work as expected for Win32 target.
I will check tomorrow what is the code state about it.
Offline
Pages: 1