#include <nnsys/mcs.h>
HANDLE NNS_McsOpenStream(
USHORT channel,
DWORD flags);
| 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) |
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().
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. |
2005/01/11 Added description. 2004/10/08 Added a description of the channel argument. 2004/07/20 Added references. 2004/06/01 Initial version.
CONFIDENTIAL