EldoS | Feel safer!

Software components for data protection, secure storage and transfer

HttpsClient SendData Event

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
#27343
Posted: 11/25/2013 01:05:40
by Jeff Newlin (Standard support level)
Joined: 12/26/2010
Posts: 19

I'm debugging a post request and I wanted to view the data that is going out on my Https.Post command. I'm trying to send simple text data.

I just want to write the buffer into a string but I am getting access violation using my current method :

procedure TForm2.HTTPSClientSendData(Sender: TObject; Buffer: Pointer;
Size: Integer);
Var
SString : String ;

begin
SetLength(SString, Size);
Move(Buffer, Pointer(SString), Size);
Memo.Lines.Add(SString) ;
end ;

What might I be doing wrong here?

Thank you,
Jeff
#27344
Posted: 11/25/2013 01:18:55
by Ken Ivanov (EldoS Corp.)

Hello Jeff,

Please use the following syntax for the Move() call:

Move(Buffer^, SString[1], Size);

Note that SString should be an ANSI string, so on Unicode-capable Delphi it should be declared as SString : AnsiString.

Reply

Statistics

Topic viewed 614 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!