'{'#0'S'#0'a'#0'm'#0'p'#0'l'#0'e'#0'-'#0'M'#0'e'#0's'#0's'#0'a'#0'g'#0'e'#0'}'#0
デバッガーのように表示される文字列を受け取ります。
デバッグ出力()に出力する必要がありますOutputDebugString
。
を実行するOutputDebugString(PChar(mymsg))
と、受信した文字列の最初の文字のみが表示されます(おそらく文字列の#0
終わりマーカーが原因です)。
その文字列を使用できるものに変換するにはどうすればよいOutputDebugString
ですか?
アップデート1:コードは次のとおりです。変数の内容を出力したいRxBufStr
。
procedure ReceivingThread.OnExecute(AContext : TIdContext);
var
RxBufStr: String;
begin
with AContext.Connection.IOHandler do
begin
CheckForDataOnSource(10);
if not InputBufferIsEmpty then
begin
RxBufStr := InputBuffer.Extract();
end;
end;
end;