You are not logged in.
I'm using WebSockets for remote interface calls and think I have found a bug.
So given these types:
TClientID = TGUID;
TSessionID = Int64;
IOSSCallback = invokable interface
I had this method in interface:
function SubscribeToOss(const ACallback: IOSSCallback; const AClientID: TClientID: TSessionId;
Which worked fine, then I extended the params to:
function SubscribeToOss(const ACallback: IOSSCallback; const AClientID: TClientID; const AComputer: string; const AApplicationName: string; const AUserName: string): TSessionId;
And of course recompiled both sides, but Server raises:
IOSSService.SubscribeToOss failed on AComputer:string [missing or invalid value]
Which is not true, the AComputer params is present, but there seems to be a bug in server in param matching.
Then I changed the signature again, just rearranged the order of params into this:
function SubscribeToOss(const AComputer: string; const AApplicationName: string; const AClientID: TClientID; const ACallback: IOSSCallback): TSessionId;
And now it works fine again.
So the problem has something to do with order of params, in particular, having String after Interface or GUID.
I could investigate more, but hope this is enough info for you guys to find the bug.
Offline
It's not string that is the problem, it's the GUID.
It turns out the last signature I posted doesn't work either, but doesn't raise an exception, instead the CallBack param is always nil.
So it's this const AClientID: TClientID that doesn't work
TClientID is a TGUID which is a record:
TGUID = record
D1: Cardinal;
D2: Word;
D3: Word;
D4: array[0..7] of Byte;
end;
From my limited debugging it seems that it fails to read record correctly but this is not detected correctly so it raise exception on following parameter in case of string, or doesn't raise anything at all in case of interface param.
Offline
records need to be declared as packed record, see documentation on Record serialization
Offline