Regular file scanning

Regular files are scanned by using the kaveScanFile function. Except for the parameters common for all scanning functions, the kaveScanFile function requires a name of the file to scan. It is specified by using the Universal Naming Convention (UNC) path. You can also use the \\?\ prefix for local and UNC paths when working with Win32® API file I/O to avoid path string parsing by Windows API. This convention turns the automatic path expansion performed by APIs off directly sending the path to the file system thus allowing to construct extended-length paths. If necessary, you can access devices by using the \\.\ prefix.

Using UNC path and path constructed with prefixes that turn off automatic path expansion and allow for direct opening of devices is only supported on Windows platform.

Using relative paths is not recommended!

The example below demonstrates usage of the kaveScanFile function with standard local path.

Example:

// The kaveScanFile function usage

unsigned long dwScanningMode = KAV_O_M_PACKED | KAV_O_M_ARCHIVED | KAV_O_M_MAILPLAIN | KAV_O_M_HEURISTIC_LEVEL_SHALLOW;

 

KAV_RESULT result = KAV_S_R_NONSCANNED;

unsigned long dwTaskID = 0;

void *ctx;

 

HRESULT hr = kaveScanFile( "c:\\Test\\eicar.com", 7, dwScanningMode, KAV_CLEAN_SKIP, INFINITE, ctx, &dwTaskID, &result );

The following parameter values of the kaveScanFile function are specified in the example:

Page top