Scans a folder and its subfolders for hidden objects and rootkits. Note that this function is not designed for regular folder scanning which requires more computational resources. When this function detects an object that cannot be found by the OS API, the EVENT_SUSPECTED event is generated.
This function is deprecated. Attempting to call this function will result in E_NOTIMPL error. Consider using the QSCAN anti-rootkit mechanism instead. This mechanism can be enabled by invoking the kaveScanCriticalArea function with the enCriticalAreaType parameter set to STARTUP_QSCAN.
To access the drive, the kaveScanForRootkitsInFolder function uses the KLIF.sys driver; therefore this driver must be installed before using the function. For more information about driver installation, see section "Drivers".
The function is not implemented for Linux-based solutions. This function is supported on 64-bit Windows platform under WoW64 virtual machine emulation only.
Syntax
HRESULT kaveScanForRootkitsInFolder (
const char *pScanFolderName,
BOOL bIncludeSubFolders,
BOOL bDeepScan,
unsigned long dwScanPriority,
unsigned long dwScanningMode,
unsigned long dwCleaningMode,
unsigned long dwScanTimeout,
void *pUserContext,
unsigned long *pdwObjectID,
KAV_RESULT *pResult);
Parameters
The kaveScanForRootkitsInFolder function has the following parameters.
kaveScanForRootkitsInFolder function parameters
Name |
Type |
Description |
|---|---|---|
|
in |
A pointer to the full path to the folder to be scanned. |
|
in |
This parameter defines if the system should scan subfolders of the folder being scanned. |
|
in |
This parameter defines if the deep scan is on. When the deep scan is on, the system analyzes a large number of various objects thus detecting those rootkits that hide in the file system by intercepting and processing file API. This mode requires significant operating system resources. It is recommended not to use this option by default. Use the deep scan mode (that is pass |
|
in |
A priority level for scanning the indicated area. 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 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. |
|
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 a file via File Monitor this pointer specifies a unique file identifier. This file ID is generated internally by KAV SDK allowing you to track the raised events back to files associated with particular events. This makes it possible for you to get information about all the events associated with a particular scanned object through a callback function. |
|
out |
A pointer to the variable describing the scan result. If this variable does not have the If this variable has the |
Return value
In case the kaveScanForRootkitsInFolder function succeeds, its return value is S_OK. For information on other return codes, see section "Return codes".