CHAILink SDK  Version 1.3
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CLC_ErrorCode LocalDevice_AddInput ( CPHOBJECT const  hLocalDevice,
InOutCapabilities const  inCaps,
CPCHAR8 const *const  utf8InputName,
CPSECTIONID const *const  pSectionID,
CPUINT32 const  dwInputUserData,
CPHOBJECT *const  phInput,
CPUINT16 *const  pwInputID 
)

Add an Input.

The new Input's ID is the ordinal number in the collection of Inputs.

Parameters
[in]hLocalDeviceHandle to the local device.
[in]inCapsThe combined Input capabilities. Usually used to give information about the kinds of message handled by this Input. If the Input is aimed to host parameters, the input capabilities can be leaved at IOC_None. The CHAI will automatically add the CPNS::Enums::IC_HasParameters and the right IOC_Msg_* depending on the parameter types.
[in]utf8InputNameThe input name
[in]pSectionIDPointer to the related section ID. If empty, it is automatically transformed in a valid sectionID having the SECT_Other type. If it is not empty, the SectionType part must not be a wildcard value. If the instance part is 0xFFFF (wildcard), it is automatically assigned with a unique value.
[in]dwInputUserDataA 32 bit user data associated to the returned input handle. This data will be passed back to the application in input notifications.
[out]phInputPointer to the handle of the newly created input, or CPHOBJECT_NULL if call failed.
[out]pwInputIDPointer to the input ID of the newly created input.
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.