Getting bytes from a memory that's dymanicly allocated.
Posted on 1997-07-18
Here is what I'm working with:
GetMem( BuffPointer, 2048 );
ReadFile(hComm, BuffPointer^, 10, NbrRead, @overlappedRead)
The ReadFile is reading from the serial communications-port with a baudrate at 115200, and I know that the other computer is sending bytes containing information from an A/D-converter. Therefore I want to get the value on every byte(0 - 255) so I then can use it to draw a curve on the screen.
If I do PChar(BuffPointer) the result is in Char and the information that I want is lost. Maybe You have another idea on how I should do?