When any file is attached to email in browser or any email client, how to detect the event? What is the process running in windows or browser when the file is being attached? In other words what is the process for uploading of files? How to detect that process from c# code? Is there any way to detect this event or process using FileSystemWatcher?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Simply speaking, there is not. All uploading a file does is open it,so the best you could do in theory is find the process that was opening the file and use heuristics. However FileSystemWatcher is for monitoring changes to files, and the closest you could get to finding out which process was opening a file would be constantly polling it's status using the external tool handle.exe in C#, or NtQuerySystemInformation in C++.