kaveGetMonitorSettings

Gets monitor settings.

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

Syntax

HRESULT kaveGetMonitorSettings (

  MONITOR_TYPE  enMonitorType,

  const KAV_MONITOR_SETTINGS *pSettings,

  BOOL  bAllocStringBuffers);

Parameters

The kaveGetMonitorSettings function has the following parameters.

kaveGetMonitorSettings function parameters

Name

Type

Description

enMonitorType

in

Monitor type.

For more information, see section "Monitor types".

pSettings

in, out

A pointer to the structure to store settings of the corresponding monitor. The function fills the structure with actual values.

For more details on monitor settings structures, see the following sections: KAV_FILE_MONITOR_SETTINGS, KAV_FILE_MONITOR_SETTINGS2, KAV_POP3_MONITOR_SETTINGS, KAV_WEB_MONITOR_SETTINGS, KAV_WEB_MONITOR_SETTINGS2, KAV_WEB_MONITOR_SETTINGS3, KAV_PDM_MONITOR_SETTINGS, KAV_PDM_MONITOR_SETTINGS2, and KAV_PDM_MONITOR_SETTINGS3.

bAllocStringBuffers

in

If this parameter is TRUE, this means the returned monitor settings can contain string parameters.

For File Monitor these are its include and exclude masks, for Web monitor—the path to the "Access Denied" page template location. Other monitors do not have string settings.

If the bAllocStringBuffers parameter is TRUE, free the memory allocated for storing information by calling the kaveFreeBuffer function.

If the bAllocStringsBuffer parameter is FALSE, string monitor settings are filled with zeroes, and there is no need to free the memory.

Return value

If the kaveGetMonitorSettings function succeeds, the return code is S_OK.

For other return codes, see section "Return codes".

Note, that before calling of the kaveGetMonitorSettings function you need to fill the dwSettingsStructSize and enType fields of the KAV_MONITOR_SETTINGS structure, thus specifying the necessary structure size and type of a monitor which settings to obtain.

Examples

The example below illustrates the usage of the kaveGetMonitorSettings function:

Example:

KAV_FILE_MONITOR_SETTINGS2 settings = {0};

settings.s.dwSettingsStructSize = sizeof(KAV_FILE_MONITOR_SETTINGS2);

settings.s.enType = FILE_MONITOR;

HRESULT getResult = kaveGetMonitorSettings(FILE_MONITOR, reinterpret_cast<KAV_MONITOR_SETTINGS*>(&settings), FALSE);

Page top