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

Google


Objective Systems, Inc.

File stream functions.

File stream functions are used for stream operations with files. More...

Functions

int rtxStreamFileAttach (OSCTXT *pctxt, FILE *pFile, OSUINT16 flags)
 Attaches the existing file structure pointer to the stream.
int rtxStreamFileOpen (OSCTXT *pctxt, const char *pFilename, OSUINT16 flags)
 Opens a file stream.
int rtxStreamFileCreateReader (OSCTXT *pctxt, const char *pFilename)
 This function creates an input file stream using the specified file name.
int rtxStreamFileCreateWriter (OSCTXT *pctxt, const char *pFilename)
 This function creates an output file stream using the file name.

Detailed Description

File stream functions are used for stream operations with files.


Function Documentation

int rtxStreamFileAttach OSCTXT pctxt,
FILE *  pFile,
OSUINT16  flags
 

Attaches the existing file structure pointer to the stream.

The file should be already opened either for the reading or writing. 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.
pFile Pointer to FILE structure. File should be already opened either for the writing or reading.
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 rtxStreamFileCreateReader OSCTXT pctxt,
const char *  pFilename
 

This function creates an input file stream using the specified file name.

Parameters:
pctxt Pointer to a context structure variable that has been initialized for stream operations.
pFilename Pointer to null-terminated string that contains the name of file.
Returns:
Completion status of operation: 0 = success, negative return value is error.

int rtxStreamFileCreateWriter OSCTXT pctxt,
const char *  pFilename
 

This function creates an output file stream using the file name.

Parameters:
pctxt Pointer to a context structure variable that has been initialized for stream operations.
pFilename Pointer to null-terminated string that contains the name of file.
Returns:
Completion status of operation: 0 = success, negative return value is error.

int rtxStreamFileOpen OSCTXT pctxt,
const char *  pFilename,
OSUINT16  flags
 

Opens a file stream.

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.
pFilename Pointer to null-terminated string that contains the name of file.
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.


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