Export (0) Print
Expand All

DeleteVolumeMountPoint function

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.

In Windows 8 and Windows Server 2012, this function is supported by the following technologies.

TechnologySupported

Server Message Block (SMB) 3.0 protocol

No

SMB 3.0 Transparent Failover (TFO)

No

SMB 3.0 with Scale-out File Shares (SO)

No

Cluster Shared Volume File System (CsvFS)

No

Resilient File System (ReFS)

No

 

SMB does not support volume management functions. For CsvFs, a new mount point will not be replicated to the other nodes on the cluster.

Examples

For an example, see Unmounting a Volume at a Mount Point.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

FileAPI.h (include Windows.h);
WinBase.h on Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP (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

 

 

Community Additions

ADD
Show:
© 2014 Microsoft