PFN_ONDETECT

Purpose

This function notifies KAV SDK that partner scan function detected a threat.

Syntax

typedef KAV_SC_RESULT (__cdecl *PFN_ONDETECT)(

KAV_SCAN_CONTEXT context,

const char* virusName,

KAV_DETECT_DANGER danger,

KAV_DETECT_TYPE type,

KAV_VERDICT_CURABILITY curability);

Parameters

The PFN_ONDETECT function type has the following parameters.

PFN_ONDETECT parameters

Name

In/Out

Type

Description

context

In

KAV_SCAN_CONTEXT

Context of the scan task that was passed to the partner scan function.

This parameter is a pointer to to KAV_SCAN_OBJECT structure. For more information, see KAV_SCAN_CONTEXT.

virusName

In

const char

Name of the threat in ASCII encoding.

danger

In

KAV_DETECT_DANGER

Severity level of the detected threat.

type

In

KAV_DETECT_TYPE

Threat type of the detected threat.

curability

In

KAV_VERDICT_CURABILITY

Curability verdict for the detected threat.

If the partner scan function attempts to disinfect the threat, this value must be KVC_CURABLE. If any other value is specified, KAV SDK handles the threat according to the monitor cleaning mode.

Return value

The return value of PFN_ONDETECT is one of the values of the KAV_SC_RESULT enumeration type. The following return values are possible.

PFN_ONDETECT return values

Return value

Description

SC_R_OK

Operation completed successfully.

SC_R_CURE

Partner scan function can modify the object.

SC_R_CANCEL

Partner scan function cannot modify the object. This may be a part of intentional behavior for file monitors. For more information, see Using partner scan function.

SC_R_FAIL

An error occurred during the operation. See KAV SDK logs for more information.

SC_R_INVALIDARG

One or more arguments passed to the function are invalid.

Page top