Memory block scanning

Memory blocks are scanned by using the kaveScanMemory function. Except for the parameters common for all scanning functions, the kaveScanMemory function requires a pointer to the memory block (in the local process memory) to scan and its size.

The example below demonstrates usage of the kaveScanMemory function.

Example:

// The kaveScanMemory function usage

char szEICAR[] = "X5O!P%@AP[4\\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTI-VIRUS-TEST-FILE!$H+H*";

unsigned long dwScanningMode = KAV_O_M_PACKED | KAV_O_M_ARCHIVED | KAV_O_M_MAILPLAIN | KAV_O_M_HEURISTIC_LEVEL_SHALLOW;

KAV_RESULT result = KAV_S_R_NOTSCANNED;

unsigned long dwTaskID = 0;

void *ctx;

 

HRESULT hr = kaveScanMemory ( (BYTE*) szEICAR, strlen ( szEICAR ), 5, dwScanningMode, KAV_CLEAN_SKIP, INFINITE, ctx, &dwTaskID, &result);

The following parameter values of the kaveScanMemory function are specified in the example:

Page top