views:

387

answers:

2

We have an app that monitors a folder for file drop and need to initiate a virus scan before using any incoming files.

This needs to be a part of the Delphi app and the file must pass the Virus Scan otherwise we delete the file.

I know that there are command shell options available, however this must be a direct API call to a registered AV engine installed on the PC.

We have looked at the MSOffice AntiVirus API but that only seems to be for developers wanting to make scanning apps that are triggered by hosting apps. We need the opposite.

Any suggestions on a Virus Scanning Engine and API would be greatly appreciated.

Thanks in advance.

+2  A: 

The procedure is described here, in the section entitled 'Internet Explorer 5 and Office 2000 Implementation'.

A Delphi implementation of enumerating the category is available here (GetRegisteredAntiviruses). Just fill out a TMsoavinfo and call Scan.

Most AV programs allow you to scan a file by passing it as a single argument on the command line - I believe Windows Live Messenger uses this method.

Mark
A: 

Check out the mail servers with virus scanning. VPOP3 supports two scanners, one of them Sophos (business oriented AV). That will lead you to the APIs.

mj2008