delphi - 使用delphi以编程方式执行防病毒程序

标签 delphi delphi-7 antivirus-integration windows-xp-sp2

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

下载完成后如何执行客户端安装的防病毒程序?

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

提前致谢。

最佳答案

See the nice person's answer to my other question.

看起来您应该获取两个 COM 接口(interface),其中之一记录在此处:

IAttachmentExecute

此接口(interface)是 Windows shell 接口(interface)的一部分。

这里是源码中的评论

/**
 * 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.

I found some more implementation information here. The feature is called AES.

关于delphi - 使用delphi以编程方式执行防病毒程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3292216/

相关文章:

sdk - 使用 Antivirus SDK 扫描上传的文件

azure - 实时防病毒检查Azure网站文件上传

multithreading - FloatToStr/DateToStr 的线程安全性

performance - 当我关闭 {$IMPORTEDDATA} 时,性能是否有真正的提升?

multithreading - 如果线程的主进程被强制结束,线程是否会自动终止?

c++ - 在 Delphi 中从 c++ DLL 调用函数

java - 使用 JAVA 从命令行运行 Symantec End Point DoScan.exe

c - delphi 中使用列表中的循环单元引用是否可行?

c++ - 无法在动态链接库 HCNetSDK.dll 中找到程序入口点 NET_DVR_RealPlay_V40

Delphi 在编译时复制具有未知基类型的泛型对象