> I have written this function where I use serwrite (unit serial). > If I call > > serial.serwrite(prn,pchar(f.bufptr),f.bufPos); > > like this, it puts out garbage.
That's odd. It is supposed to write "bufpos" bytes, the first 4 (or 8 on 64-bit) are the exact values of the pointer (p.bufptr) you want to write. In the case you want to write the content the pointer points TO, try pchar(f.bufptr)[0] or f.bufptr^ if that is allowed (I don't know what bufptr exactly is) _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal