以编程方式使用delphi执行防病毒程序 [英] Execute antivirus program programmatically using delphi

查看:190
本文介绍了以编程方式使用delphi执行防病毒程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一个小应用程序来使用indy组件传输文件,现在我要启动防病毒程序,当传输完成以检查文件。

I wrote an small app to transfer files using the indy components, now i want start the antivirus program when the transfer is finished to check the files.

下载完成后,我可以执行安装在客户端的防病毒程序吗?

how i can execute the antivirus program installed in the client side, when the download finish?

更新
下载文件后,我需要实现类似于firefox的操作,然后执行机器中安装的防病毒软件。

UPDATE I need implement something similar to firefox when download a file and then execute the antivirus installed in the machine.

提前感谢。

推荐答案

查看好人的答案我的另一个问题。

看起来有两个COM接口你应该抓住,其中一个记录在这里:

Looks like there are two COM interfaces you should be grabbing, one of which is documented here:

IAttachmentExecute

此界面是windows shell界面的一部分。

This interface is part of the windows shell interfaces.

这里是源中的评论

/**
 * Code overview
 *
 * Download scanner attempts to make use of one of two different virus
 * scanning interfaces available on Windows - IOfficeAntiVirus (Windows
 * 95/NT 4 and IE 5) and IAttachmentExecute (XPSP2 and up).  The latter
 * interface supports calling IOfficeAntiVirus internally, while also
 * adding support for XPSP2+ ADS forks which define security related
 * prompting on downloaded content.  
 *
 * Both interfaces are synchronous and can take a while, so it is not a
 * good idea to call either from the main thread. Some antivirus scanners can
 * take a long time to scan or the call might block while the scanner shows
 * its UI so if the user were to download many files that finished around the
 * same time, they would have to wait a while if the scanning were done on
 * exactly one other thread. Since the overhead of creating a thread is
 * relatively small compared to the time it takes to download a file and scan
 * it, a new thread is spawned for each download that is to be scanned. Since
 * most of the mozilla codebase is not threadsafe, all the information needed
 * for the scanner is gathered in the main thread in nsDownloadScanner::Scan::Start.
 * The only function of nsDownloadScanner::Scan which is invoked on another
 * thread is DoScan.

我在这里找到了更多的实现信息。该功能称为AES。

这篇关于以编程方式使用delphi执行防病毒程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆