Library External Antivirus ========================== The mail server lets you create your own antivirus library modules you can use in the external antivirus section of the antivirus engine. A library module is a standard dynamic linked library file which can be written in any programming tool such as Microsoft Visual C++, Delphi or Borland C++ Builder. The library has to fully support multi threaded calls and be stable. Only one exported case sensitive function is required dword avScanFile (pchar szFileName; dword dwFlags; dword* dwResult; pchar szVirusName) The library module can perform any operations and actions and finally has to return a result value. A successful result value is 0. szFileName - file to be scanned dwFlags - reserved for later use dwResult - returned antivirus result, see notes below szVirusName - name of the virus found Every successful call to the function with result 0 will have the dwFlags checked. The variable can bear the following bit values. define AVLib_Virus 1 // Virus has been found and szVirusName has been filled with the name of the virus Typical use would be: // Define variables dword flags, returnr, result; char[255] virusname; // Scan file result = avScanFile('c:\\temp\\virus.com', flags, &returnr, &virusname); // Check result if (result==0) // Virus found if (returnr & AVLib_Virus) { printf('Virus found %s', virusname); }