Click to Rate and Give Feedback
MSDN
MSDN Library
System Services
File Services
File Systems
Volume Management
 DeleteVolumeMountPoint Function
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.

To compile an application that uses this function, define the _WIN32_WINNT macro as 0x0500 or later. For more information, see Using the Windows Headers.

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: 10/22/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
vb.net syntax      dmex   |   Edit   |   Show History
<DllImport("kernel32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
Public Shared Function DeleteVolumeMountPoint(ByVal mountPoint As String) As Boolean
End Function
Flag as ContentBug
C# syntax      dmex   |   Edit   |   Show History
[DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)]
public static extern bool DeleteVolumeMountPoint(string mountPoint);
Tags What's this?: c# (x) syntax (x) Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker