Platform SDK: Files and I/O

DeleteVolumeMountPoint

The DeleteVolumeMountPoint function unmounts the volume from the specified volume mount point.

BOOL DeleteVolumeMountPoint(
  LPCTSTR lpszVolumeMountPoint  // volume mount point path
);

Parameters

lpszVolumeMountPoint
[in] Pointer to a string that indicates the volume mount point to be unmounted. This may be a root directory (X:\, in which case the DOS drive letter assignment is removed) or a directory on a volume (X:\mnt\). A trailing backslash is required.

Return Values

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

It is not an error to attempt to unmount a volume from a volume mount point when there is no volume actually mounted at that volume mount point.

Requirements

  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.

See Also

File Systems Overview, File System Functions, GetVolumeNameForVolumeMountPoint, GetVolumePathName, SetVolumeMountPoint