XBinder
Version 2.9.x
|
Memory stream functions are used for memory stream operations. More...
Functions | |
EXTERNRT int | rtxStreamMemoryCreate (OSCTXT *pctxt, OSUINT16 flags) |
Opens a memory stream. More... | |
EXTERNRT int | rtxStreamMemoryAttach (OSCTXT *pctxt, OSOCTET *pMemBuf, size_t bufSize, OSUINT16 flags) |
Opens a memory stream using the specified memory buffer. More... | |
EXTERNRT OSOCTET * | rtxStreamMemoryGetBuffer (OSCTXT *pctxt, size_t *pSize) |
This function returns the memory buffer and its size for the given memory stream. More... | |
EXTERNRT int | rtxStreamMemoryCreateReader (OSCTXT *pctxt, OSOCTET *pMemBuf, size_t bufSize) |
This function creates an input memory stream using the specified buffer. More... | |
EXTERNRT int | rtxStreamMemoryCreateWriter (OSCTXT *pctxt, OSOCTET *pMemBuf, size_t bufSize) |
This function creates an output memory stream using the specified buffer. More... | |
EXTERNRT int | rtxStreamMemoryResetWriter (OSCTXT *pctxt) |
This function resets the output memory stream internal buffer to allow it to be overwritten with new data. More... | |
Memory stream functions are used for memory stream operations.
EXTERNRT int rtxStreamMemoryAttach | ( | OSCTXT * | pctxt, |
OSOCTET * | pMemBuf, | ||
size_t | bufSize, | ||
OSUINT16 | flags | ||
) |
Opens a memory stream using the specified memory buffer.
The 'flags' parameter specifies the access mode for the stream - input or output.
pctxt | Pointer to a context structure variable that has been initialized for stream operations. |
pMemBuf | The pointer to the buffer. |
bufSize | The size of the buffer. |
flags | Specifies the access mode for the stream:
|
EXTERNRT int rtxStreamMemoryCreate | ( | OSCTXT * | pctxt, |
OSUINT16 | flags | ||
) |
Opens a memory stream.
A memory buffer will be created by this function. The 'flags' parameter specifies the access mode for the stream - input or output.
pctxt | Pointer to a context structure variable that has been initialized for stream operations. |
flags | Specifies the access mode for the stream:
|
EXTERNRT int rtxStreamMemoryCreateReader | ( | OSCTXT * | pctxt, |
OSOCTET * | pMemBuf, | ||
size_t | bufSize | ||
) |
This function creates an input memory stream using the specified buffer.
pctxt | Pointer to a context structure variable that has been initialized for stream operations. |
pMemBuf | The pointer to the buffer |
bufSize | The size of the buffer |
EXTERNRT int rtxStreamMemoryCreateWriter | ( | OSCTXT * | pctxt, |
OSOCTET * | pMemBuf, | ||
size_t | bufSize | ||
) |
This function creates an output memory stream using the specified buffer.
If pMemBuf
or bufSize
is NULL then new buffer will be allocated.
pctxt | Pointer to a context structure variable that has been initialized for stream operations. |
pMemBuf | The pointer to the buffer. Can be NULL - new buffer will be allocated in this case. |
bufSize | The size of the buffer. Can be 0 - new buffer will be allocated in this case. |
EXTERNRT OSOCTET* rtxStreamMemoryGetBuffer | ( | OSCTXT * | pctxt, |
size_t * | pSize | ||
) |
This function returns the memory buffer and its size for the given memory stream.
The caller of this function is responsible for freeing the memory.
pctxt | Pointer to a context structure variable that has been initialized for stream operations. |
pSize | The pointer to size_t to receive the size of buffer. |
EXTERNRT int rtxStreamMemoryResetWriter | ( | OSCTXT * | pctxt | ) |
This function resets the output memory stream internal buffer to allow it to be overwritten with new data.
Memory for the buffer is not freed.
pctxt | Pointer to a context structure variable that has been initialized for stream operations. |