Deletes a drive letter or mounted folder.
Syntax
BOOL WINAPI DeleteVolumeMountPoint(
__in LPCTSTR lpszVolumeMountPoint
);
Parameters
- lpszVolumeMountPoint [in]
-
The drive letter or mounted folder to be deleted. A trailing backslash is required, for example, X:\ or Y:\MountX\.
Return Value
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.
Remarks
Deleting a mounted folder does not cause the underlying directory to be deleted.
If the lpszVolumeMountPoint parameter is a directory that is not a mounted folder, the function does nothing. The directory is not deleted.
Examples
For an example, see
Unmounting a Volume at a Mount Point.
Requirements
| Minimum supported client | Windows 2000 Professional |
| Minimum supported server | Windows 2000 Server |
| Header | WinBase.h (include Windows.h) |
| Library | Kernel32.lib |
| DLL | Kernel32.dll |
| Unicode and ANSI names | DeleteVolumeMountPointW (Unicode) and DeleteVolumeMountPointA (ANSI) |
See Also
- GetVolumeNameForVolumeMountPoint
- GetVolumePathName
- SetVolumeMountPoint
- Volume Management Functions
- Mounted Folders
Send comments about this topic to Microsoft
Build date: 11/12/2009