On Mon, 14 Jan 2008, Luiz Americo Pereira Camara wrote:
> Marc Weustink wrote:
> > ik wrote:
> > > On Jan 14, 2008 3:59 AM, wfifi <[EMAIL PROTECTED]> wrote:
> > > > thanks ido
> > > > wireshark is a great tool, i attach a log, found data is got, but
> > > > Component's status not change.
> > >
> > > I've read your code again (and looked at the log), I noticed this:
> > > strstream.WriteString(String(ABuffer))
> > >
> > > You are casting a pointer as a string... The way to convert PChar to a
> > > string is to use the function StrPas
> >
> > Only if you use shortstrings. When using ansistrings you can cast a PChar in
> > to a string like: String(SomePchar)
> > With ansistrings you seldom (or never) need StrPas
> >
>
> What about the length that is stored just before the memory location of
> ansistrings? Does PChar created with StrAlloc have this field?
No.
Michael.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives