osOpenStream Function
Declaration:
HANDLE osOpenStream(
  SYSNAME Name
);
Parameters:
Name

The name of the stream object to be opened.

Return value:

Returns a handle to the opened stream object upon success, or NULL_HANDLE on failure. Call the osGetLastError function to retrieve extended error information.

Description:

This function opens an existing stream object by its name.

Stream objects are utilized to read, write, and manage continuous streams of binary data.

During stream creation, an optional name may be assigned to the object, enabling tasks to access it via the osOpenStream function. When a stream is no longer required, its handle should be closed using osCloseHandle. The stream object is deleted only after it has been closed by all tasks that held an open handle. Further details can be found in the System Objects Management section.

If no osOpen* functions are utilized within the application, the system ignores object names and excludes the name management code to reduce the final executable size. For more information regarding object naming and opening, refer to the System Objects Management section.

For additional information regarding streams, refer to the Stream Objects section.

This function is available only when the OS_USE_STREAM and OS_OPEN_STREAM_FUNC constants are both set to 1. If this function is not required, set OS_OPEN_STREAM_FUNC to 0 to reduce the total code size.

Version:1.0
Header file:OS_Stream.h (include OS_API.h)
See also: HANDLE, NULL_HANDLE, OS_OPEN_STREAM_FUNC, osCloseHandle, osCreateStream, osGetLastError, streams, SYSNAME, system objects management
SpaceShadow documentation