After a new folder has been created, the folder is empty, that is, it has no scalars set within it. Your application must use the SmsSetScalar function to set the scalars for the new folder.
To set the value of a scalar, both the scalar and its folder must have an access right of ACCESS_MODIFY or ACCESS_CREATE. If you do not have ACCESS_MODIFY or ACCESS_CREATE right to the scalar, SmsSetScalar returns an SMS_SCALAR_NO_UPDATE value. If you do not have access to the folder, the SmsSetScalar returns an SMS_FOLDER_NO_UPDATE value.
To get information (such as name, data type, access rights, and so on) about all scalars within a folder, use the SmsDescribeFolder function.
The SmsSetScalar function takes two parameters:
There are four types of scalars: SCALAR_INT, SCALAR_STRING, SCALAR_TIME, and SCALAR_BINARY. The following examples show how to set the value for each type of scalar:
Example of Setting a SCALAR_INT Scalar
Example of Setting a SCALAR_STRING Scalar
Example of Setting a SCALAR_BINARY Scalar
Example of Setting a SCALAR_TIME Scalar