NNS_McsOpenStream

C Specification

#include <nnsys/mcs.h>

HANDLE NNS_McsOpenStream(
USHORT            channel,
DWORD   flags);

Arguments

channel Value for identifying a stream. You can specify in the range 0-0x3FFF. 0x4000-0x7FFF is reserved for NITRO-System applications. 0x8000-0xFFFF is reserved for the MCS system.
flags Flags specified when stream is opened. (For details, see the description)

Return Values

If the stream is successfully opened, the function returns the stream's handle. If the process fails, the function returns INVALID_HANDLE_VALUE. You can get details about the error using GetLastError().

Description

Opens a stream for Multiple Channel Stream. Stream is actually a pipe that has the message type of the Win32 system, and the return value becomes a handle for this pipe that has a name. The function NNS_McsOpenStream opens the pipe that has the message type name, and registers the value that identifies the stream specified with the argument channel to the MCS server.

To read and write to the stream, use ReadFile(Ex) and WriteFile(Ex) of Win32 API.

With the argument flag, 0 or the values shown below can be specified. This value is passed to the sixth argument (dwFlagsAndAttributes) in CreateFile of Win32 API.

FILE_FLAG_OVERLAPPED Inputs/outputs asynchronously (overlapped I/O). For details, see the explanation of CreateFile in the Win32 API.

See Also

NNS_McsOpenStreamEx

Revision History

01/11/2005 Added description. 10/08/2004 Added a description of the channel argument. 07/20/2004 Added references. 06/01/2004 Initial version.