本文介绍了如何知道进程ID的所有者或在发生ERROR_SHARING_VIOLATION的情况下如何处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

当我们使用CreateFile打开特定的设备端口时,它可能会因错误ERROR_SHARING_VIOLATION而失败.
这意味着该进程无法访问该文件,因为该文件正在被另一个进程使用.";

Dear all,

When we open the specific device port using CreateFile, it may fail by the error ERROR_SHARING_VIOLATION.
This means ''The process cannot access the file because it is being used by another process.'';

I would like to kill that process which preacquired the device manually.

您能提供一些想法来获取进程ID或句柄来触发kill命令吗?

预先感谢,
Jay

Could you give any ideas to get the process ID or handle to trigger the kill command?

Thanks in advance,
Jay

推荐答案


这篇关于如何知道进程ID的所有者或在发生ERROR_SHARING_VIOLATION的情况下如何处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 17:41