如何获取访问共享文件的用户名? [英] How to get the names of users accessing the shared file?

查看:226
本文介绍了如何获取访问共享文件的用户名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我们有一个Windows桌面应用程序,使用该应用程序用户可以访问存储的文件,或者在共享文件夹中,例如\\RemoteComputer \ Folold OR本地系统上的文件夹。


如果文件有更新,存储在共享文件夹中,如果已经被其他一些用户打开,那么我们需要显示弹出窗口,显示已打开该共享文件的用户名?


是否可以拥有此类用户名列表?如果是,那么我可以使用哪个API?


谢谢。

解决方案

您好,


可能会有所帮助:


https://stackoverflow.com/questions/581219/find-out-who-is-locking-a-file-on-a-网络共享


https://docs.microsoft.com/en-us/windows/desktop/netshare/network-share-management-functions


此致,Guido




Hi There,

We have a windows desktop application, using which user can access files stored, either in a shared folder like \\RemoteComputer\Folder OR a folder on local system.

In case, if there is an update on a file, stored in shared folder, and if that is already open by some other user(s), then we need to display a pop up, showing the username(s) who have opened that shared file?

Is it possible to have such list of user names? If yes, then which API, I can use for that?

Thanks.

解决方案

Hello,

maybe this can help:

https://stackoverflow.com/questions/581219/find-out-who-is-locking-a-file-on-a-network-share

https://docs.microsoft.com/en-us/windows/desktop/netshare/network-share-management-functions

Regards, Guido



这篇关于如何获取访问共享文件的用户名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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