函数原型:
BOOL DeleteVolumeMountPoint(
LPCTSTR lpszVolumeMountPoint // volume mount point path
);
参数:
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.
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.
举例说明:
//删除上一节子为F盘设置的挂载点C:\\share\\
CHAR szVolumeMountPoint[] = "C:\\share\\";
BOOL bRet = DeleteVolumeMountPoint(szVolumeMountPoint);
if (bRet)
{
printf("success");
//............
}