Assigning a Drive Letter to a Volume You can assign a drive letter (for example, x:\) to a local volume using SetVolumeMountPoint, provided there is no volume already assigned to that drive letter. If the local volume already has a drive letter then SetVolumeMountPoint will fail. To handle this, first delete the drive letter using DeleteVolumeMountPoint. For example code, see Editing Drive Letter Assignments. The system supports at most one drive letter per volume. Therefore, you cannot have C:\ and F:\ represent the same volume.Caution Deleting an existing drive letter and assigning a new one may break existing paths, such as those in desktop shortcuts. It may also break the path to the program making the drive letter changes. With Windows virtual memory management, this may break the application, leaving the system in an unstable and possibly unusable state. It is the program designer's responsibility to avoid such potential catastrophes.
Editing Drive Letter Assignments The code example in this topic shows you how to add or remove persistent drive letter assignments. These drive letter assignments persist through system shutdown. For more information, see Assigning a Drive Letter to a Volume. The code example uses the following functions: DefineDosDevice, DeleteVolumeMountPoint, GetVolumeNameForVolumeMountPoint, and SetVolumeMountPoint. Please search "Editing Drive Letter Assignments" in MSDN to see the example code.
用
GetVolumeNameForVolumeMountPoint
DeleteVolumeMountPoint
SetVolumeMountPoint
You can assign a drive letter (for example, x:\) to a local volume using SetVolumeMountPoint, provided there is no volume already assigned to that drive letter. If the local volume already has a drive letter then SetVolumeMountPoint will fail. To handle this, first delete the drive letter using DeleteVolumeMountPoint. For example code, see Editing Drive Letter Assignments.
The system supports at most one drive letter per volume. Therefore, you cannot have C:\ and F:\ represent the same volume.Caution Deleting an existing drive letter and assigning a new one may break existing paths, such as those in desktop shortcuts. It may also break the path to the program making the drive letter changes. With Windows virtual memory management, this may break the application, leaving the system in an unstable and possibly unusable state. It is the program designer's responsibility to avoid such potential catastrophes.
The code example in this topic shows you how to add or remove persistent drive letter assignments. These drive letter assignments persist through system shutdown. For more information, see Assigning a Drive Letter to a Volume.
The code example uses the following functions: DefineDosDevice, DeleteVolumeMountPoint, GetVolumeNameForVolumeMountPoint, and SetVolumeMountPoint.
Please search "Editing Drive Letter Assignments" in MSDN to see the example code.
DeleteVolumeMountPoint
SetVolumeMountPoint
..........你说的那些函数我有用过,能列决出来的所有挂接点都是在HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices项下内容,我更想知道的是映射驱动器路径的问题,比如说我将J盘(U盘)映射成本地的一个文件夹C:\mount001\,但是我用你说的那类函数不能列决出c:\mount001\来。