kaveQBRescanObjectEx

Scans an object in the backup storage for malware.

This function allows you to scan stored objects on the basis of the information obtained from the HTTP protocol data. If you do not provide this information to the function, it will behave in the same way as to the kaveQBRescanObject function.

If you do not have extra detail for the file, or you want the KAV Engine to perform a regular scanning procedure, do either of the following:

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. Unlike the kaveScanFileEx function, kaveQBRescanObjectEx has no cleaning mode.

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,

const KAV_EXTRA_OBJECT_INFO_BASE *pQBRescanExtraInfo

unsigned long dwScanPriority,

unsigned long dwScanningMode,

unsigned long dwScanTimeOut,

void *pUserContext,

unsigned long *pdwObjectId,

KAV_RESULT *pResult);

Parameters

The kaveQBRescanObjectEx function has the following parameters.

kaveQBRescanObjectEx function parameters

Name

Type

Description

qwObjectID

in

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

The identifier can be either 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 is sorted by the objects’ priority. The files with higher priority are scanned first.

pQBRescanExtraInfo

in

A pointer (casted to KAV_EXTRA_OBJECT_INFO_BASE*) to the KAV_EXTRA_OBJECT_INFO_HTTP data structure that contains additional technical data to facilitate scanning of encrypted objects in backup storage on the basis of the data gathered from HTTP traffic.

If you do not have additional information to provide, initialize this pointer to NULL. If you only have some additional information, initialize the data fields of the KAV_EXTRA_OBJECT_INFO_HTTP structure for which you do not have the information, to NULL.

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 kaveQBRescanObjectEx 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