DeleteVolumeMountPoint Function

Deletes a drive letter or mounted folder.

Syntax

C++
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 clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinBase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode and ANSI namesDeleteVolumeMountPointW (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

Tags :


Community Content

dmex
vb.net syntax
<DllImport("kernel32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
Public Shared Function DeleteVolumeMountPoint(ByVal mountPoint As String) As Boolean
End Function
Tags : vb.net syntax

dmex
C# syntax
[DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)]
public static extern bool DeleteVolumeMountPoint(string mountPoint);
Tags : c# syntax

Page view tracker