大网数据广告活动
磁盘与文件系统

Creating Mounted Folders

· 52CE 我爱测

Creating a mounted folder is a two-step process.

Creating a mounted folder is a two-step process. First, call GetVolumeNameForVolumeMountPoint with the mount point (drive letter, volume GUID path, or mounted folder) of the volume to be assigned to the mounted folder. Then use the SetVolumeMountPoint function to associate the returned volume GUID path with the desired directory on another volume. For example code, see Creating a Mounted Folder.

Your application can designate any empty directory on a volume other than the root as a mounted folder. When you call the SetVolumeMountPoint function, that directory becomes the mounted folder. You can assign the same volume to multiple mounted folders.

After the mounted folder has been established, it is maintained through computer restarts automatically.

If a volume fails, any volumes that have been assigned to mounted folders on that volume can no longer be accessed through those mounted folders. For example, suppose you have two volumes, C: and D:, and that D: is associated with the mounted folder C:\MountD\. If volume C: fails, volume D: can no longer be accessed through the path C:\MountD\.

Only NTFS file system volumes can have mounted folders, but the target volumes for the mounted folders can be non-NTFS volumes.

Mounted folders are implemented by using reparse points and are subject to their restrictions. For more information, see Reparse Points. It is not necessary to manipulate reparse points to use mounted folders; functions such as SetVolumeMountPoint handle all the reparse point details for you.

Because mounted folders are directories, you can rename, remove, move, and otherwise manipulate them, as you would other directories.

(Note: The TechNet documentation uses the term mounted drives to refer to mounted folders.)

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。