kaveQBRescanObject

Scans an object in the backup storage for malware. Scanning is performed similarly to that by the kaveScanFile function. The callback events are the same as returned by KAV Engine during a regular file scanning task. Disinfection and deletion of objects in the backup storage is not possible.

If you want to rescan an object in the backup storage, you can obtain the identifier of the object either by using the kaveQBGetIds function or by retrieving it from the callback function parameters when the EVENT_BACKUPSUCCEEDED event is raised. For more details, see sections kaveQBGetIds and "Callback function prototype".

The current KAV SDK version does not contain implementation of this function for Linux-based solutions.

Syntax

HRESULT kaveQBRescanObject (

ULONGLONG qwObjectId,

unsigned long dwScanPriority,

unsigned long dwScanningMode,

unsigned long dwScanTimeOut,

void *pUserContext,

unsigned long *pdwObjectId,

KAV_RESULT *pResult);

Parameters

The kaveQBRescanObject function has the following parameters.

kaveQBRescanObject function parameters

Name

Type

Description

qwObjectID

in

The identifier of an object in the backup storage to be scanned.

The identifier can either be returned by a callback function or by the kaveQBGetIds function.

dwScanPriority

in

A priority level for scanning the indicated file. The higher the value is, the higher the priority is.

Priority level is taken into consideration when selecting objects from the scanning queue. The queue items are sorted by the objects’ priority. The files with higher priority are scanned first.

dwScanningMode

in

File scanning mode. For more information, see section "Scanning modes".

If the user is supposed to decide on the action on an infected object, such action is requested by calling the callback function with the appropriate parameters.

The KAV_O_M_BACKUP flag is ignored here.

dwScanTimeout

in

The maximum time in milliseconds allotted for performing the scan task. After the specified timeout expires, the scanning is stopped and the function returns with the KAV_E_TIMEOUT error code.

To impose no time limit for the scanning task, set dwScanTimeout to INFINITE or to 0.

pUserContext

in

A pointer to the user context passed to the callback function.

Any user data that can be used by a callback function.

pdwObjectID

out

A pointer to the scan task identifier. It helps to distinguish scan tasks and their results in case of asynchronous scanning and monitoring—it is used for accessing the scanning result through a callback function.

The scan task identifier can also be used for canceling this particular scanning task. For more information, see kaveCancelScan.

When scanning a file via File Monitor this pointer specifies a unique file identifier. This file identifier is generated internally by KAV SDK allowing you to track the raised events back to files associated with particular events.

This makes it possible for you to get information about all the events associated with a particular scanned object via a callback function.

pResult

out

A pointer to the variable that describes the scan result.

If this variable is not NULL, the function is called synchronously—the function does not return until the scan is completed. The scan result will be written to pResult.

If this variable is NULL, the function is called asynchronously. In this case the scan result can be obtained only by calling a callback function with the appropriate parameters.

Return value

If the kaveQBRescanObject function succeeds, its return value is S_OK.

If any malware is detected, either the scan result is written to *pResult (in case of synchronous scanning), or a callback function is called.

In other cases, one of the error codes is returned. For more information about return codes, see section "Return codes".

Page top