GetVolumeNameForVolumeMountPoint() 是否返回卷的 GUID?
GetVolumeNameForVolumeMountPoint() 是否返回 c++ 中卷的 GUID?
GetVolumeNameForVolumeMmountPoint()
{
LPCTSTR lpszvolumeMountPoint,
LPTSTR lpszVolumeName,
DWORDcchBufferLength,
}
我的意思是如果我使用可移动磁盘。 lpszVolumeName 在同一台计算机上会保持不变吗? 每次我将磁盘插入计算机的 USB 端口时,它是否会返回特定卷的特定 ID。 并确保不同的磁盘卷会得到不同的结果? 非常感谢!
Does GetVolumeNameForVolumeMountPoint() return the GUID of a volume in c++?
GetVolumeNameForVolumeMmountPoint()
{
LPCTSTR lpszvolumeMountPoint,
LPTSTR lpszVolumeName,
DWORDcchBufferLength,
}
I mean if I am using a removeable disk. will the lpszVolumeName remained the same on the same computer?
Does it return a certain ID for a certain volume everytime I insert the disk on my computer' USBport.
And Make sure different disk's volumes will get different result?
Many Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我找到了一些关于安装管理器的文档表明 GUID 与卷永久关联,并且在系统重新启动后仍保留。
I found some documentation about the mount manager that states the GUID is permanently associated with the volume and it is persisted across system restarts.
MSDN 将volumename 称为GUID,但事实并非如此。
我通过以下步骤进行测试:
仅将 DiskA 连接到带有 HDD Dock 的 PC,WinXP 为其分配字母“G”,GUID 为 {ea044c37-816f-11e3-bea8-005056c00008},如寄存器所示
用 DiskB 替换 DiskA并连接到PC,驱动器盘符是相同的“G”,GUID是相同的{ea044c37-816f-11e3-bea8-005056c00008};
MSDN call volumename as GUID, but it's not the case.
I test it with following step:
Connect only DiskA to PC with HDD Dock, WinXP assign letter 'G' to it and GUID is {ea044c37-816f-11e3-bea8-005056c00008}, as register shows
Replace DiskA with DiskB and connect it to PC, driver letter is the same 'G', and GUID is the same {ea044c37-816f-11e3-bea8-005056c00008};