K
kiths
Unregistered / Unconfirmed
GUEST, unregistred user!
TMSGData=Record
Strlength:integer;
Str:Array of char;
end;
procedure TfrmClientMain.tbSendClick(Sender: TObject);
var MSGData:TMSGData;
i,len:integer;
SendStr:string;
tmpPchar: pchar;
begin
SendStr:='<SMSMsg>13900239223$break$13916809666$break$天之道损有余而补不足,是故虚胜实,不足胜有余$break$-YYFA';
len:=length(SendStr);
MSGData.Strlength:=len;
SetLength(MSGData.Str,len);
tmpPchar := pchar(SendStr);
for i := 0 to len-1 do
begin
MSGData.Str := tmpPchar;
end;
memo1.lines.add(inttostr(len));
memo1.lines.add(inttostr(sizeof(integer)+len));
Messagebox(0,pchar(MSGData.Str),'',MB_OK);
ClientSocket.Socket.Sendbuf(MSGData,sizeof(integer)+len);
end;
Strlength:integer;
Str:Array of char;
end;
procedure TfrmClientMain.tbSendClick(Sender: TObject);
var MSGData:TMSGData;
i,len:integer;
SendStr:string;
tmpPchar: pchar;
begin
SendStr:='<SMSMsg>13900239223$break$13916809666$break$天之道损有余而补不足,是故虚胜实,不足胜有余$break$-YYFA';
len:=length(SendStr);
MSGData.Strlength:=len;
SetLength(MSGData.Str,len);
tmpPchar := pchar(SendStr);
for i := 0 to len-1 do
begin
MSGData.Str := tmpPchar;
end;
memo1.lines.add(inttostr(len));
memo1.lines.add(inttostr(sizeof(integer)+len));
Messagebox(0,pchar(MSGData.Str),'',MB_OK);
ClientSocket.Socket.Sendbuf(MSGData,sizeof(integer)+len);
end;