Platform SDK: Files and I/O |
The SetVolumeMountPoint function mounts the specified volume at the specified volume mount point.
BOOL SetVolumeMountPoint( LPCTSTR lpszVolumeMountPoint, // mount point LPCTSTR lpszVolumeName // volume to be mounted );
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
It is not an error to attempt to mount a volume at a volume mount point at which a volume is already mounted. In this case, the system unmounts the preceding volume without sending notifications before attempting to mount the new volume.
It is an error to attempt to mount a volume on a directory that has any files or subdirectories in it. This error occurs for system and hidden directories as well as other directories, and it occurs for system and hidden files.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Unsupported.
Header: Declared in Winbase.h; include Windows.h.
Library: Use Kernel32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows 2000.
File Systems Overview, File System Functions, DeleteVolumeMountPoint, GetVolumeNameForVolumeMountPoint, GetVolumePathName