Avaya Logo

Previous Topic

Next Topic

Book Contents

Book Index

setIRAPIparam, setIRAPIparamstr

The setIRAPIparam, setIRAPIparamstr, getIRAPIparam, and getIRAPIparamstr instructions set or get the value of an IRAPI library channel-based parameter.

Synopsis

#include irapi.h
getIRAPIparam(identifier, type.dest)
getIRAPIparamstr(identifier, ctype.dest, type.count)
setIRAPIparam(identifier, type.value)
setIRAPIparamstr(identifier, ctype.string, type.count)

Description

The setIRAPIparam and setIRAPIparamstr functions assign values to an IRAPI library parameter, while getIRAPIparam and getIRAPIparamstr get the current value of a parameter.

getIRAPIparamstr returns exactly count bytes of data to the area specified by value. Since some string parameters are actually blocks of data, such as IRP_REGISTER, getIRAPIparamstr ignores any NULL characters in the parameter data. It also makes no attempt to NULL terminate the string. setIRAPIparamstr also ignores NULL characters and copies the number of bytes for the parameter (specified in IrPARAMETERS(4IRAPI) or through count) into the call profile. setIRAPIparamstr copies only count bytes of data beginning at the address specified by value, therefore, value need only point to an area of size count.

Parameters are preserved across exec boundaries.

Return values

getIRAPIparam, getIRAPIparamstr, setIRAPIparam, and setIRAPIparamstr return 0 in register 0 (r.0) if successful and return -1 in register 0 (r.0) if an error occurs.

© 2006 Avaya Inc. All Rights Reserved.