Scans a memory block.
When the Cloud Protection is enabled, this function performs additional checking of object reputation via Kaspersky Security Network.
Syntax
HRESULT kaveScanMemory (
BYTE *pbyScanMemory,
DWORD dwScanMemorySize,
DWORD dwScanPriority,
DWORD dwScanningMode,
DWORD dwCleaningMode,
DWORD dwScanTimeout,
void *pUserContext,
DWORD *pdwObjectID,
KAV_RESULT *pResult);
Parameters
The kaveScanMemory function has the following parameters.
kaveScanMemory function parameters
Name |
Type |
Description |
|---|---|---|
|
in |
A pointer to the beginning of the memory block to be scanned. |
|
in |
The size of the indicated memory block. |
|
in |
A priority level for scanning the indicated memory block. The higher the value is, the higher the priority is. Priority level is taken into consideration when selecting the objects from the scanning queue. The queue is sorted according to the objects’ priority. The objects with higher priority are scanned first. |
|
in |
Scanning mode. The mode can be specified as a mask of scanning options, which defines types of files to be scanned for presence of malware and turns on various scanning technologies such as Advanced Disinfection mechanism. For example, you may specify the following mask:
This mask enables scanning of memory range containing archived files and packed binaries, mail database and plain mail message files and turns on Advanced Disinfection that triggers when active malware is detected during the scan. For more information, see section "Scanning modes". In case the user is supposed to decide on the action with an infected object, such action is requested by calling the callback function with the appropriate parameters. |
|
in |
A cleaning mode that determines the action to be performed by KAV Engine upon detection of a malware. For possible parameter values, see section "Cleaning modes". Regardless of the cleaning mode settings, the KAV SDK reacts to the malware detection event by calling a callback function with the appropriate parameters. |
|
|
The maximum time in milliseconds allotted for performing a scan task. After the specified timeout expires, the scanning is stopped and the function returns with the To set no time limit for the scanning task, use the |
|
in |
A pointer to any user data that can be used by a callback function. |
|
out |
A pointer to the scan task identifier. It helps to distinguish scan tasks and their results in case of asynchronous scanning and monitoring—it is used for accessing the scanning result through a callback function. The scan task ID can also be used for canceling this particular scanning task. For more information, see When scanning files via File Monitor, unique identifiers assigned to scanned files by KAV SDK are returned directly to callback function in the |
|
out |
A pointer to the variable describing the scan result. If this variable does not have the If this variable has the |
Return value
If the kaveScanMemory function succeeds and no malware is detected, the return value is S_OK.
For other return codes, see section "Return codes".
Page top