This topic has not yet been rated - Rate this topic

DeleteVolumeMountPoint function

Applies to: desktop apps only

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 XP

Minimum supported server

Windows Server 2003

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: 4/17/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
C# syntax
[DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)]
public static extern bool DeleteVolumeMountPoint(string mountPoint);
vb.net syntax
<DllImport("kernel32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
Public Shared Function DeleteVolumeMountPoint(ByVal mountPoint As String) As Boolean
End Function