2010-07-20 17 views
5

का उपयोग कर रहा इंडी घटकों का उपयोग फ़ाइलों को हस्तांतरण करने के लिए एक छोटा सा एप्लिकेशन लिखा था, अब मैं चाहता हूँ एंटीवायरस प्रोग्राम जब हस्तांतरण फ़ाइलों की जाँच करने के समाप्त हो गया है शुरू।एंटीवायरस प्रोग्राम निष्पादित प्रोग्राम के रूप में डेल्फी

मैं कैसे एंटीवायरस प्रोग्राम ग्राहक के पक्ष में स्थापित निष्पादित कर सकते हैं, जब डाउनलोड खत्म?

अद्यतन मैं फ़ायरफ़ॉक्स को कुछ इसी तरह लागू करने की जरूरत है जब डाउनलोड एक फ़ाइल और फिर एंटीवायरस मशीन में स्थापित निष्पादित।

अग्रिम धन्यवाद।

+2

में कमेंटरी सबसे एंटीवायरस प्रोग्राम फाइल सिस्टम में हुक और किसी भी तरह नए फ़ाइलों का पता लगाने मत है? –

+0

क्या आप पूछ रहे हैं कि एप्लिकेशन को अन्य उपयोगकर्ता के कंप्यूटर पर स्वचालित रूप से कैसे शुरू किया जाए (आपका नहीं)? क्या आप एक सेवा करने की कोशिश कर रहे हैं? आपने एंटी-वायरस प्रोग्राम लिखा है या आप एंटी-वायरस प्रोग्राम को अपने प्रोग्राम को स्कैन करना चाहते हैं जो एंटी-वायरस प्रोग्राम नहीं है? मैं उलझन में हूं। –

+0

@ वॉरेन पी, मैंने अपना प्रश्न अपडेट किया। जब मेरे क्लाइंट ऐप ने डाउनलोड समाप्त किया तो बस मुझे इंस्टॉल एंटीवायरस का उपयोग करके फ़ाइल स्कैन करने की आवश्यकता है। – Salvador

उत्तर

7

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

लग रहा है दो COM इंटरफ़ेस आप हथियाने किया जाना चाहिए, जिनमें से एक यहाँ प्रलेखित है देखते हैं जैसे:

IAttachmentExecute

यह इंटरफ़ेस खिड़कियां खोल इंटरफेस का हिस्सा है।

यहाँ स्रोत

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

+1

सी ++ स्रोत दिखा कैसे फ़ायरफ़ॉक्स करता है यह http://mxr.mozilla.org/mozilla1.9.1/source/toolkit/components/downloads/src/nsDownloadScanner.cpp पर है – glob

2

चेक कैसे अन्य कार्यक्रमों यह कर, WinRAR तरह। सबसे अधिक संभावना है कि यह केवल एंटी-वायरस प्रोग्राम को उस फ़ाइल या फ़ोल्डर से शुरू कर रहा है जिसे आप कमांड लाइन पैरामीटर के रूप में स्कैन करना चाहते हैं। यह जांचने के लिए कि आप यह कैसे किया है, आप अपने एंटी-वायरस प्रोग्राम के मैनुअल की जांच कर सकते हैं।

0

आप, ShellExecute या CreateProcess का उपयोग कर सकते मैं ShellExecute का उपयोग, लेकिन मैं अगर तुम एक एंटीवायरस कहा जाता है पर अमल करना चाहते हैं के बारे में सुना CreateProcess बेहतर है है का कहना है कि antivvv का उपयोग कर shellapi यह इस तरह से कार्य करें:

uses ShellApi; 
... 
ShellExecute(Handle, 'open', 'c:\program files\antivvv.exe', nil, nil, SW_SHOWNORMAL) ; 
+2

यह क्यों कम हो गया? –

+0

मैं एक नहीं हूं, लेकिन संभवतः क्योंकि यह एवी को फ़ाइल की जांच करने के लिए कुछ भी नहीं करता है। –

+1

यह केवल एंटीवायरस प्रोग्राम के कमांड लाइन विकल्पों पर निर्भर करता है। -1 कठोर लगता है। – Tobiasopdenbrouw

संबंधित मुद्दे