CHAILink SDK  Version 1.3
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CLC_ErrorCode LocalDevice_AddPipe ( CPHOBJECT const  hLocalDevice,
CPBOOLEAN const  fSynapse,
CPUINT32 const  dwPipeUserData,
CPHOBJECT *const  phPipe,
CPUINT16 *const  pwPipeID 
)

Add a Pipe.

The new Pipe's ID is the ordinal number in the collection of Pipes going down from 0xFFFE.

Parameters
[in]hLocalDeviceHandle to the local device.
[in]fSynapseTRUE if the pipe is a Synapse. A Synapse automatically forward incoming message to all connected pipes, except the source of the message.
[in]dwPipeUserDataA 32 bit user data associated to the returned pipe handle. This data will be passed back to the application in pipe notifications.
[out]phPipePointer to the handle of the newly created pipe, or CPHOBJECT_NULL if call failed.
[out]pwPipeIDPointer to the pipe ID of the newly created pipe.
Returns
Standard CHAILink Client return code. See CLC_ErrorCode enumeration.
Warning
This function can only be called in CopperLan context. This means in the pseudo task CPDoProcess(), in notification handlers or in asynchronous return handlers and not in SystemDoProcess() for instance.