Scans a memory block for malware.
This function allows you to scan a block of memory on the basis of the information obtained from the HTTP protocol data. If you do not provide this information to the function, it will behave in the same way as the kaveScanMemory function.
If you do not have extra detail for the file that may be associated with the memory block you scan, or you want KAV Engine to perform a regular scanning procedure, do either of the following:
kaveScanMemory function.pScanMemoryExtraInfo parameter of the kaveScanMemoryEx function with NULL.The function will behave the same way as the kaveScanMemory function.
When the Cloud Protection is enabled, this function performs additional checking of object reputation via Kaspersky Security Network.
Syntax
HRESULT kaveScanMemory (
unsigned char *pbyScanMemory,
unsigned long dwScanMemorySize,
const KAV_EXTRA_OBJECT_INFO_BASE *pScanMemoryExtraInfo
unsigned long dwScanPriority,
unsigned long dwScanningMode,
unsigned long dwCleaningMode,
unsigned long dwScanTimeout,
void *pUserContext,
unsigned long *pdwObjectID,
KAV_RESULT *pResult);
Parameters
The kaveScanMemoryEx function has the following parameters.
kaveScanMemoryEx 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 pointer (casted to If you do not have additional information to provide, initialize this pointer to |
|
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. 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 |
An action upon detection 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. |
|
in |
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 kaveScanMemoryEx function succeeds and no malware is detected, the return value is S_OK.
For other return codes, see section "Return codes".
Page top