Gets the specified number of bytes from the packet and stores them in the provided buffer.
This method treats the data as a byte stream and will not perform marshalling of the data. If the offset specified is the P6PKTCUROFFSET constant, then the packet's internal position will be advanced by the number of bytes extracted.
- Parameters
-
pBuffer | A pointer to the buffer in which to place the extracted bytes. |
cBuffer | The size of pBuffer in bytes. |
nOffset | The offset from 0 in the packet at which to begin extracting bytes. The internal position will not be updated. If P6PKTCUROFFSET is specified, the packets internal "current" position is used and updated by the number of bytes extracted. |
- Returns
Success | P6R::eOk | The data was written or appended successfully. |
Failure | P6R::eSeek | The specified nOffset was past the end of the buffer. |
P6R::eTooBig | Reading the value from the specified offset would result in reading past the end of the buffer. |
P6R::eInvalidArg | pVal was NULL. |