Initializing the KAV SDK is performed by calling the kaveInitializeEx or kaveInitialize function. At this stage, the essential scanner properties like the number of scanning threads or whether the scanner will run as a separate process are defined. A callback function to use for obtaining and processing scan results is also specified while initialization. For more details on scan results, see section "Processing scan results".
Platform dependency
KAV SDK package for 32-bit versions of Windows is shipped with malware definition files that are compatible only with the target 32-bit versions of Windows. Using these definition files with a 32-bit version of KAV SDK on a 64-bit version of Windows is not supported. Please note that you must use separate malware definition files when the same 32-bit build of KAV SDK is used on a 64-bit Windows platform.
Use the following platform specifiers when downloading KAV SDK components using Updater SDK:
When a 32-bit version of KAV SDK is used on a 32-bit version of Windows, both user mode and kernel mode components of KAV SDK must be compiled for the x86 platform. To obtain the components, set the value of TargetPlatform member of the PRODUCT_SETTINGS structure to "kernel:i386;user:i386".
When a 32-bit version of KAV SDK is used on a 64-bit version of Windows, user mode components of KAV SDK must be compiled for the x86 platform, and the kernel mode components of KAV SDK must be compiled for the x86-64 platform. To obtain the components, set the value of TargetPlatform member of the PRODUCT_SETTINGS structure to "kernel:x64;user:i386".
When a 64-bit version of KAV SDK is used on a 64-bit version of Windows, both user mode and kernel mode components of KAV SDK must be compiled for the x86-64 platform. To obtain the components, set the value of TargetPlatform member of the PRODUCT_SETTINGS structure to "kernel:x64;user:x64".
To provide for platform flexibility it is recommended to you use a universal platform specifier. This specifier allows you to obtain both 32-bit and 64-bit kernel mode components for KAV SDK. User mode components are safe to be compiled for 32-bit platforms. The 32-bit user mode components are executed in the WoW64 emulating subsystem on 64-bit Windows platforms. To obtain the components, set the value of TargetPlatform member of the PRODUCT_SETTINGS structure to "kernel:i386,x64;user:i386".
When both flavors of components are available, KAV SDK automatically picks the proper version of the component depending on the environment. Please note, the multiplatform specifier instructs Updater SDK to obtain kernel mode components for both platforms. As a result it requires twice as much the disk space for the kernel mode components.
Note that you may use an alternative way to initialize downloading of required components in Updater SDK. Instead of using the PRODUCT_SETTINGS data structure in Updater API, you may consider using update configuration file. This is an XML file with the same update options as configured through the data structure. When using update configuration file, add the listed platform specifiers to the TargetPlatform element in the configuration file. See the documentation shipped with Updater SDK for more details.
Desktop integration
When integrating KAV SDK on a desktop Windows platform, please note the following aspects of using this specific mode of integration.
Desktop integrations are only supported for in-process integration mode of KAV SDK.
Scanning functions and monitors must be used in Skip signed mode. When using on-demand scanning functions, this mode is turned on by specifying KAV_O_M_SKIPSIGNED scanning mode in the dwScanningMode parameter of each specific function. With monitor components this mode is specified in specific data structures. For example, to turn on the Skip signed mode for the File Monitor component, add the KAV_O_M_SKIPSIGNED scanning mode to the value of dwScanningMode member of the KAV_FILE_MONITOR_SETTINGS2 data structure.
The HIPS2 component must be loaded for proper functioning of Skip signed mode. This component is required for working in Skip signed mode and is obtained by using Updater SDK. To configure Updater SDK for obtaining the HIPS2 component from Kaspersky update servers, please include the HIPS2 code in the value of the ComponentsToUpdate parameter of update configuration file, or add this value to the ComponentsToUpdate member of the PRODUCT_SETTINGS data structure available through Updater SDK.
Deferred scanning
After SDK is initialized, it automatically starts a scanning task that serves for service purposes. Such as scanning task runs in a separate thread and helps to strengthen overall security of the operational environment of your application and the system you protect.