Sending char array from client(VC++) to Delphi(Server)
-
I am sending login credentials through ActiveX Control developed in VC++ 6.0 to Server side which is developed in Delphi //Client side struct in VC++ 6.0 typedef struct { char User[41]; char Password[41]; char ClientVersion[41]; char EndCode[2]; }TNetConnectCheck; //Server side struct in Delphi6 TNetConnectCheck = record UserName : string[40]; Password : string[40]; ClientVersion : String[40]; // Added by Ravi on : 03/08/2006 EndCode : array[0..1] of Char; end; but, I am getting some junk characters in the strings at serverside eg. User name like 'CrazyToLearn#0...#0' I want to send the packet which is having the length 125 to server with exact 'CrazyToLearn' not with any padding 0 or junk characters. I tried all the trims, dynamic char array but cant solve the problem. I dont have to change code at server side,whatever we want to modify , its only at client side. Please instant help will be really appreciated... THANX
:) CraZyToLearn :)