kaveAddTrustedProcess

Adds a process to the trusted processes list. The applications from this list are ignored by the KAV monitoring functions.

By default, this list is empty. The degree of belief to the trusted processes can be specified. For example, for certain trusted processes file operations will be ignored while network traffic will still be monitored.

This function is not available in native builds of KAV SDK for x64 Windows platform and on all types of Linux platforms.

Note that this function supports 32-bit environments only. The function supports native execution when run on a 32-bit Windows. The function supports 64-bit operating systems when executed under WoW64 machine only (a Windows subsystem emulating 32-bit environment). The function does not work in native 64-bit mode under a 64-bit operating system.

The function requires Kaspersky drivers to be installed and started on the host operating system. Each driver must be installed for a specific platform; avoid installing 32-bit drivers on a 64-bit operating system.

The kaveAddTrustedProcess function requires that you import monitor configuration settings to the system registry. Do this before initializing KAV SDK (see section "Getting started in Windows").

You can import monitor settings by running either !reg32.bat (for 32-bit calling process) or !reg64.bat (for 64-bit calling process) batch file. These files are delivered with the KAV SDK distribution package. When settings are imported, no computer restart is necessary and kaveAddTrustedProcess can be called as soon as KAV SDK is initialized properly. If you need to import settings from a 32-bit process running on a 64-bit Windows platform, call the !reg32.bat batch file.

Syntax

HRESULT kaveAddTrustedProcess (

  const char  *pImagePath,

  unsigned long dwFlags,

  void   *pReserved);

Parameters

The kaveAddTrustedProcess function has the following parameters.

kaveAddTrustedProcess function parameters

Name

Type

Description

pImagePath

in

The full path to the name of the executable file which must be considered as a trusted process.

Environment variables can be used when specifying this name, for example "%ProgramFiles%\\Far\\Far.exe".

Do NOT specify quotes when setting path to the image that must be considered trusted.

dwFlags

in

A bit mask with flags that defines a degree of belief to the process specified by the pImagePath parameter.

The possible flags are:

  • KAV_TRUSTED_OPEN_FILES—do not intercept file operations.
  • KAV_TRUSTED_BEHAVIOR—do not analyze process behavior.
  • KAV_TRUSTED_NET—do not intercept network traffic.
  • KAV_TRUSTED_SSL_ONLY—together with the KAV_TRUSTED_NET flag means that only encrypted network traffic will not be intercepted.

    Note, that when a process is added to the list of trusted processes several times, the resulting flags are defined as a result of logical OR of all the flags that were specified by every call of the kaveddTrustedProcess function.

pReserved

in

Reserved pointer; currently not used.

Return value

The table below describes the possible return values of the kaveAddTrustedProcess function.

kaveAddTrustedProcess function return codes

Return code

Description

S_OK

The function succeeds.

E_FAIL

Unexpected error occurred during execution.

E_UNEXPECTED

The function was called at unexpected moment: for example, before the SDK is initialized or before another call of the function from a different thread is completed.

E_INVALIDARG

Invalid arguments have been passed to the function.

Page top