PFN_WRITE

Purpose

This function writes buffer contents to the object, starting from the current position. This function is used by partner scan function for disinfection.

Syntax

typedef KAV_SC_RESULT (__cdecl *PFN_WRITE)(

KAV_SCAN_CONTEXT context,

const void* buff,

unsigned long bytesToWrite,

unsigned long* bytesWritten);

Parameters

The PFN_WRITE function type has the following parameters.

PFN_WRITE 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 KAV_SCAN_OBJECT structure. For more information, see KAV_SCAN_CONTEXT.

buff

In

const void*

Buffer for writing to the object.

bytesToWrite

In

unsigned long

Number of bytes to write to the object.

bytesWritten

Out

unsigned long*

Number of bytes that were written to the object.

You can specify NULL in this parameter.

Return value

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

PFN_WRITE return values

Return value

Description

SC_R_OK

Operation completed successfully.

SC_R_CANCEL

Operation was canceled by KAV SDK. Check that the monitor cleaning mode allows disinfection.

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.

Remarks

PFN_WRITE will return SC_R_FAIL if object modification is not enabled. For more information, see PFN_ONDETECT.

Page top