VLScpdReadRecord
Syntax
int VLScpdReadRecord(
int iPersistType,
char *pcCpdKeyIn,
int iSzKey,
char *pcCpdValueOut,
int iSzValue,
char *pcErrorInfoOut);
Argument |
Direction |
Data Type |
Description |
---|---|---|---|
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. Recommended storage allocation for storing the key data is 40 bytes. |
pcCpdValueOut |
OUT |
char* |
The persistence data is stored in key value pairs. This parameter stores the value data. The buffer for this value is allocated by Sentinel RMS. The size of this buffer is specified using the iSzValue parameter |
iSzValue |
IN |
int |
Length of the value data. This length of this value will change for different persistence types. The Developer must take due care while writing data to the pcCpdValueOut pointer. |
pcErrorInfoOut |
OUT |
char* |
Description
This API reads a single record from the custom persistence device. The record is selected as per the unique combination of passed parameters, key data 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_NO_RECORD_FOUND |
The object does not exist. |
VLS_CPD_DEVICE_FATAL_ERROR |
Read/write failure or any other error. |