The KAV SDK has three operating modes depending on the place where anti-virus scanner is placed—in the process, in the separate process and in the service.
In the service mode, the KAV Engine (loaded to the kavehost.exe) is placed in the service process. Before using the engine, it should be manually registered with the system.
You can register kavehost.exe by using the following command in the command line:
kavehost.exe -reg
You can unregister it by the following command:
kavehost.exe -del
If you want to start the service after it is registered with the Service Control Manager (SCM) database, run the following command at the command prompt:
net start kavehost
Unlike on Unix-like platforms, on Windows platform KAV library only supports local connections to kavehost.exe. Remote connections to the kavehost service via TCP protocol are not supported.
Handling errors in service mode
When you work with KAV library as a service, errors occurred on the server side may be specifically handled by KAV client. For example, when the server side hosted by kavehost.exe process ends unexpectedly, the client side of KAS library returns the KAV_S_R_NONSCANNED error code on every attempt scan an email following the termination of the kavehost.exe host process.