Windows API 第21篇 DeleteVolumeMountPoint 删除挂载点
函数原型:
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"); //............ }
posted on 2018-10-08 17:09 priarieNew 阅读(1130) 评论(0) 编辑 收藏 举报