VLScpdWriteRecord
Syntax
int VLScpdWriteRecord(
int iOperationMode,
int iPersistType,
char *pcCpdKeyIn,
int iSzKey,
char *pcCpdValueIn,
int iSzValue,
char *pcErrorInfoOut);
Argument |
Direction |
Data Type |
Description |
---|---|---|---|
iOperationMode |
IN |
int |
Describes the type of write operation to be performed on the device. Available types are: >CPD_WRITE_RECORD =0,Write to the device >CPD_MODIFY_RECORD =1, Modify existing data |
iPersistType |
IN |
int |
Type of persistence device. Refer to Persistence Types section for more information. |
pcCpdKeyIn |
IN |
char* |
The persistence data is stored in key value pairs. This parameter stores the key. |
iSzKey |
IN |
int |
Length of the key. |
pcCpdValueIn |
IN |
char* |
The persistence data is stored in key value pairs. This parameter stores the value. |
iSzValue |
IN |
int |
Length of the value data passed in ‘pcCpdValueIn’. |
pcErrorInfoOut |
OUT |
char* |
Description
This callback API should be used for inserting/modifying a single record in a custom persistence device object identified by iPersistType. The persistence data is stored in key value pairs. This value is retrieved with the help of associated key and persistence type.
Returns
This status code VLS_CPD_SUCCESS is returned if successful. Otherwise, it will return one of the following errors codes:
Error Code |
Description |
---|---|
VLS_CPD_BAD_INPUT |
Arguments are not defined as per the specification of this API. |
VLS_CPD_DEVICE_NO_PERM |
Insufficient permissions. |
VLS_CPD_DEVICE_FATAL_ERROR |
Read/write failure or any other error. |