NScan

API

NScan

Function

This is the main function of the custom engine. The scan result returned from this function call is used by Metadefender Core's scan-related API.

Function prototype

int NScan
(
int reserved,
string filepath,
ref int scanResult,
ref string threatName,
)

Arguments

Argument

Description

reserved

Reserved for future.

filepath

Path to the file needed to scan.

scanResult

Scan result to be returned.

  • 0: clean

  • 2: suspicious

  • 1: found threat

  • 3: failed to scan

  • 10: not scanned (during update)

threatName

Threat name to be returned.

Return value

Value

Description

0

Scan completed successfully.

1

Failed to start or finish scanning.