gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 15:07:59 25 4
gpt4 key购买 nike

我编写了一个小应用程序来使用 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com