windows - 是否有可能以编程方式找出哪个进程正在通过网络锁定文件

标签 windows networking locking

我在 Windows 2003 服务器上有一个文件,该文件被另一台 Windows 2003 服务器上运行的进程锁定。是否有可能找出哪台机器上的哪个进程正在锁定该资源。我不介意使用哪种语言来执行此操作。

最佳答案

http://technet.microsoft.com/en-us/sysinternals/bb897552.aspx

PsFile

The "net file" command shows you a list of the files that other computers have opened on the system upon which you execute the command, however it truncates long path names and doesn't let you see that information for remote systems. PsFile is a command-line utility that shows a list of files on a system that are opened remotely, and it also allows you to close opened files either by name or by a file identifier.

...

How it Works

PsFile uses the NET API, which is documented in the Platform SDK.

关于windows - 是否有可能以编程方式找出哪个进程正在通过网络锁定文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/208283/

相关文章:

c# - C# 的 NDIS 中间驱动程序接口(interface)

networking - 在这种情况下如何计算端到端延迟

c++ - 我可以重复使用 TCP 连接吗?

c++ - 调整窗口大小会导致右边框附近出现污迹

iphone - 如果连接状态发生变化,我如何获得通知?

windows - 如何通过 Windows 命令行 shell 脚本保持文件打开(锁定)?

java - Hibernate 使用悲观锁还是乐观锁?

c# - Lock 语句参数中对象的用途

c++ - 使用 VerQueryValue 检索应用程序的文件描述

windows - 在 Windows 上编写轻量级 GUI 程序的最快途径是什么?