Objective Systems, Inc.  
Home
About ASN.1
Products
Free Software
Documents
Services
Resources
Resellers
Customers
Careers
About Us
Contact Us
 

Google


Objective Systems, Inc.

Memory stream functions.

Memory stream functions are used for memory stream operations. More...

Functions

int rtxStreamMemoryCreate (OSCTXT *pctxt, OSUINT16 flags)
 Opens a memory stream.
int rtxStreamMemoryAttach (OSCTXT *pctxt, OSOCTET *pMemBuf, size_t bufSize, OSUINT16 flags)
 Opens a memory stream using the specified memory buffer.
OSOCTETrtxStreamMemoryGetBuffer (OSCTXT *pctxt, size_t *pSize)
 This function returns the memory buffer and its size for the given memory stream.
int rtxStreamMemoryCreateReader (OSCTXT *pctxt, OSOCTET *pMemBuf, size_t bufSize)
 This function creates an input memory stream using the specified buffer.
int rtxStreamMemoryCreateWriter (OSCTXT *pctxt, OSOCTET *pMemBuf, size_t bufSize)
 This function creates an output memory stream using the specified buffer.

Detailed Description

Memory stream functions are used for memory stream operations.


Function Documentation

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.

Parameters:
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:
  • OSRTSTRMF_INPUT = input (reading) stream;
  • OSRTSTRMF_OUTPUT = output (writing) stream.
Returns:
Completion status of operation: 0 = success, negative return value is error.

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.

Parameters:
pctxt Pointer to a context structure variable that has been initialized for stream operations.
flags Specifies the access mode for the stream:
  • OSRTSTRMF_INPUT = input (reading) stream;
  • OSRTSTRMF_OUTPUT = output (writing) stream.
Returns:
Completion status of operation: 0 = success, negative return value is error.

int rtxStreamMemoryCreateReader OSCTXT pctxt,
OSOCTET pMemBuf,
size_t  bufSize
 

This function creates an input memory stream using the specified buffer.

Parameters:
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
Returns:
Completion status of operation: 0 = success, negative return value is error.

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.

Parameters:
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.
Returns:
Completion status of operation: 0 = success, negative return value is error.

OSOCTET* rtxStreamMemoryGetBuffer OSCTXT pctxt,
size_t *  pSize
 

This function returns the memory buffer and its size for the given memory stream.

Parameters:
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.
Returns:
The pointer to memory buffer. NULL, if error occured.


This file was last modified on 8 Jan 2007.
XBinder, Version 1.1.9