什么的Win32 API可用于查找已指定文件打开进程? [英] What Win32 API can be used to find the process that has a given file open?

查看:412
本文介绍了什么的Win32 API可用于查找已指定文件打开进程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我读或写一个文件,并收到33或32的错误,我想记录包含其他进程(ES)有打开的文件的名称的消息。必须有一个Win32 API的,我可以用它来得到这个信息。 Process Explorer的显示。当然,进程资源管理器也有关于在内存中的所有进程的信息。我想preFER找到罪魁祸首,而不询问的所有进程。

If I read or write to a file and receive a 33 or 32 error, I would like to log a message containing the name of the other process(es) that have the file opened. There must be a Win32 API I could use to get this info. Process Explorer displays it. Of course, Process Explorer also has info about all processes in memory. I'd prefer to find the culprit without interrogating all processes.

推荐答案

似乎做你想做的。

显然使用了一些隐藏的API,如 NtQueryInformationProces 秒。

obviously it uses some hidden API such as NtQueryInformationProcess.

这篇关于什么的Win32 API可用于查找已指定文件打开进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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