I have developped a client-server application using 64-bit kbmmw package on Delphi 10.3 IDE. The 64-bit client application send the requests to server by SendRequest method (kbmmwClient class method) setting the request service name and the username properties. Internally the kbmmwClient library create a request stream (TkbmMWCustomRequestTransportStream class) , which will be sent to the server.
tRequestStream:=TkbmMWCustomRequestTransportStream(cStreamClass.Create(FTransport,FTransport.Info));
tRequestStream.RequestID:=rid;
tRequestStream.ServiceName:=AServiceName;
tRequestStream.Username:=FUsername;
--Begin my debug-----------------
debug('InternalSendRequest - tRequestStream.ServiceName: ' + tRequestStream.ServiceName);
debug('InternalSendRequest - tRequestStream. Username: ' + tRequestStream.Username);
t := tkbmmwmemorystream(tRequestStream.DataStream);
SetString(streamstring, PAnsiChar(t.Memory), t.Size);
write_debug('InternalSendRequest - tRequestStream - DataStream: ' + streamstring);
--End my debug
This is the debug result:
14/04/2020 15:50:32.226: InternalSendRequest - tRequestStream.ServiceName: reqservice
14/04/2020 15:50:32.226: InternalSendRequest - tRequestStream. Username: ANDAPI
14/04/2020 15:50:32.227: InternalSendRequest - tRequestStream - DataStream: Ìû¯
STANDARDü
r e q s e r v i c e A N D A P I ÿÿÿÿ €
Why are the characters of the service name (reqservice) and the username (ANDAPI) words interspersed with null characters? When I had used the 32-bit kbmmwClient, the request stream was sent in the correct format.