这个 GUID 是什么?
连接网络驱动器后,当我们打开 Windows 资源管理器或文件对话框时, 该进程在注册表中找到此键以显示其卷名称。
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\{A45BA3B2-F3 96-4F67-8375-ECC2CA1EBBFC}\_LabelFromReg
我不知道 GUID 是什么。
- 它是什么?
- 谁(何时)创建密钥?
- 应用程序(在本例中为 Windows 资源管理器)如何知道密钥?
我正在开发一个像 SMB 一样的网络重定向器。
我应该向密钥写入一个卷名。
连接网络卷后,注册表项也会创建。 (当然,GUID 与 SMB 不同。它甚至会在创建和删除每个连接时发生变化)
但我不知道如何获取我的卷的(?)GUID。(即使谁创建了密钥)
我试图在ReactOS源代码中找到DefineDosDeviceW(可疑)。但尚未实施。 TT
- 当然,我还将卷名称写入 \MountPoints2\##UNCNAME\_LabelFromReg
但它不适用于 64 位 Windows 中的 WOW64 应用程序。
After connect a network-drive, when we open a Windows Explorer or a File Dialog,
the process find this key in the registry to show it's volume name.
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\{A45BA3B2-F3
96-4F67-8375-ECC2CA1EBBFC}\_LabelFromReg
I don't know what the GUID is.
- What is it?
- Who(When) does create the key?
- How does the application(in this case, Windows Explorer) know the key?
I'm developing a network-redirector like SMB.
I should write a volume name to the key.
Once my network volume connected, the registry key also created. (of cource the GUID is different with SMB's. It even changes whenever each connection created and deleted)
But I don't know how I can get the my volume's(?) GUID.(Even who creates the key)
I tried to find DefineDosDeviceW(suspected) in ReactOS source. But it hasn't implemented yet. T.T
-Of course, I also write the volume name to \MountPoints2\##UNCNAME\_LabelFromReg
But it doesn't work for WOW64 applications in 64Bit Windows.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这不是一个特定的 GUID;它是一个卷标识符。 Windows 资源管理器在安装卷时创建这些键。您可以通过运行不带参数的
mountvol
来查看当前安装的卷 ID 的列表。以编程方式(在 Win32 级别),您可以通过 FindFirstVolume 获取它 和朋友们。我对网络重定向器一无所知;但是,手动查看资源管理器注册表项似乎并不正确。这是探险家的私人领地。你想实现什么目标?也许有一个记录在案的 API。This is not a specific GUID; it's a volume identifier. Windows Explorer creates these keys when volumes are mounted. You can see a list of currently mounted volume IDs by running
mountvol
without parameters. Programmatically (on Win32 level), you can obtain it with FindFirstVolume and friends. I don't know anything about network redirector; however, it doesn't seem right to poke within Explorer registry key manually. It's Explorer's private territory. What are you trying to accomplish? Maybe there is a documented API for that.