Enum bug

Hi guys,

Big regression. Enums are not working.

Delphi Berlin 10.1 - RO SDK / DataAbstract Server.
Delphi clients work.
Windows C# clients do not.

Create a sample service that receives any value but returns a struct that has an enum. The enum value is not set properly, it always default to zero.

I created a test project following the wizard, added a simple method.

type
{ Forward declarations }
TNewService = class;

TNewService = class(TRORemoteDataModule, INewService)
public
function GetEnum(const Id: Integer; out ASampleStruct:
SampleStruct): Boolean; virtual;
end;

function TNewService.GetEnum(const Id: Integer; out ASampleStruct: SampleStruct): Boolean;
begin
ASampleStruct := SampleStruct.Create;
ASampleStruct.Value1 := 23;
ASampleStruct.Value2 := CoolEnum.CoolEnum_InProgress;
end;

Defined an enum.

CoolEnum = (CoolEnum_Pending, CoolEnum_InProgress, CoolEnum_Settled, CoolEnum_Cancelled);

Run it using the service tester and it will always return the enum on position zero. Pending. Delphi projects work, windows c# clients do not.

Im attaching the sample project.

We need a temp fix ASAP.

Thank you.
EnumBug.7z (73.0 KB)

this issue with Service Tester (#78730) were already fixed.
fix will be present in next beta.


my colleague will review this case

Thank you, and yes please.

Although we will do our tests once again, cause we relied on the service tester to do the initial testing and now knowing that is broken we have to test it directly in our .net client proxies, they might be fine.

Hello

We have tried to reproduce the issue using your testcase server. Everything works as it should in the latest Remoting SDK builds. The client app properly reads enum value sent from the server.