@ -37,9 +37,15 @@ The following Operating Systems are supported:
## Changelog
## Changelog
- Version **4.2.2**:
- Optimized scanning speed of PDF files
- ScanResult now returns the file path
- Added new ScanFolder() and ScanFolderString() functions
- Version **4.2.1**:
- Version **4.2.1**:
- Optimized scanning speed of big files
- Optimized scanning speed of big files
- Optimized scanning speed in Linux version
- Optimized scanning speed in Linux version
- Version **4.2**:
- Version **4.2**:
- Reduced glibc minimum version to 2.17 on Linux
- Reduced glibc minimum version to 2.17 on Linux
- Added "Logging()" function to enable/disable logging
- Added "Logging()" function to enable/disable logging
@ -91,6 +97,8 @@ You can find the definition of all functions and structs in the file `xvneng.h`
- "**File not found!**" - If no file is found in the submited path.
- "**File not found!**" - If no file is found in the submited path.
- "**File too big!**" - If the file size is bigger than the set limit.
- "**File too big!**" - If the file size is bigger than the set limit.
- "**Could not get file hash!**" - There was an error calculating the hash of the file.
- "**Could not get file hash!**" - There was an error calculating the hash of the file.
- **scanFolder** - Scans all the files inside the folder at `folderpath`. It will return an pointer for a array of [`ScanResult`](#Model).
- **scanFolderAsString** - Scans all the files inside the folder at `folderpath`. It will return the scan result message for each file scanned.
- **checkUpdates** - Checks and updates the databases and AI engine to the most recent versions. If `checkSDKUpdates`=true then it will also check for SDK updates. If `loadDBAfterUpdate`=true then it will reload the Xvirus Scan Engine after the update is done. It can return the following strings:
- **checkUpdates** - Checks and updates the databases and AI engine to the most recent versions. If `checkSDKUpdates`=true then it will also check for SDK updates. If `loadDBAfterUpdate`=true then it will reload the Xvirus Scan Engine after the update is done. It can return the following strings:
- "**There is a new SDK version available!**"
- "**There is a new SDK version available!**"
- "**Database was updated!**"
- "**Database was updated!**"
@ -104,15 +112,16 @@ You can find the definition of all functions and structs in the file `xvneng.h`
## Model
## Model
The `scan` function returns a struct `ScanResult` with the following properties:
The `scan`and `scanFolder`functions return a struct `ScanResult` with the following properties:
```c++
```c++
struct ScanResult {
struct ScanResult {
bool sucess; // true if scan was sucessful
bool sucess; // true if scan was sucessful
wchar_t* error; // error message, only has value if success=false
bool isMalware; // true if malware
bool isMalware; // true if malware
double score; // between 0 and 1, higher score means more likely to be malware, -1 if there was an error
wchar_t* name; // detection name
wchar_t* name; // detection name
wchar_t* error; // error message, only has value if success=false
double score; // between 0 and 1, higher score means more likely to be malware, -1 if there was an error