CHAILink SDK  Version 1.3
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CLC_ErrorCode LocalDevice_AddOutput ( CPHOBJECT const  hLocalDevice,
InOutCapabilities const  outCaps,
CPCHAR8 const *const  utf8OutputName,
CPSECTIONID const *const  pSectionID,
CPUINT32 const  dwOutputUserData,
CPHOBJECT *const  phOutput,
CPUINT16 *const  pwOutputID 
)

Add an Output.

The new Output's ID is the ordinal number in the collection of Outputs.

Parameters
[in]hLocalDeviceHandle to the local device.
[in]outCapsthe combined Output capabilities. Usually used to give information about the kinds of message issued by this output. However in case of using this output with controllers, the supported message types capability flags are automatically added depending on the declared controller types.
[in]utf8OutputNameThe output name
[in]pSectionIDPointer to the related section ID. If the instance part is 0xFFFF (wildcard), it is automatically assigned with a unique value.
[in]dwOutputUserDataA 32 bit user data associated to the returned output handle. This data will be passed back to the application in output notifications.
[out]phOutputPointer to the handle of the newly created output, or CPHOBJECT_NULL if call failed.
[out]pwOutputIDPointer to the Output ID of the newly created output.
Returns
Standard CHAILink Client return code. See CLC_ErrorCode enumeration.
Remarks
Several outputs can share the same section and so have the same Section ID.
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.