VLScpdDeleteRecord

Syntax

int VLScpdDeleteRecord(	 	 
int	 	iPersistType,
char	 	*pcCpdKeyIn,
int	 	iSzKey,
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 data.

iSzKey

IN

int

Length of the key

pcErrorInfoOut

OUT

char*

See Using the Diagnostic Information.

Description

This API deletes one or more records from the custom persistence storage device/location. Probable usage scenarios are as follows:

Case 1: If iPersistType parameter refers to a valid persistence type and the value of pcCpdKeyIn parameter is non-NULL.

This API will delete only one record identified by iPersistType and pcCpdKeyIn.

Case 2: If the value of iPersistType parameter is 0 and the value of pcCpdKeyIn parameter is NULL. This API will delete all records that do not have a valid persistence type. If such a record is not present, this API will return the VLS_CPD_NO_RECORD_FOUND error.

The developer should return VLS_CPD_SUCCESS to confirm record deletion.

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 record Object does not exist.

VLS_CPD_NO_OBJECT_FOUND

The object does not exist.

VLS_CPD_DEVICE_FATAL_ERROR

Read/write failure or any other error.