网站首页  词典首页

请输入您要查询的函数:

 

术语 removedirectory
释义 RemoveDirectory
语法:
C++
BOOL WINAPI RemoveDirectory(
__in LPCTSTR lpPathName
);
RemoveDirectory函数
删除一个现有的空目录。
作为一个要执行此操作的事务操作,请使用RemoveDirectoryTransacted功能。
参数
lpPathName [in]
目录的路径被删除。此路径必须指定一个空目录,然后调用进程必须删除访问目录。
在此函数的ANSI版本,名称被限制为MAX_PATH字符。为了延长此限制,以32,767宽字符,调用的功能和前面加上“\\ Unicode版本\\?\\”的路径。有关更多信息,请参见命名一个文件。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
该RemoveDirectory函数标志着关闭时删除目录。因此,该目录不删除,直到最后处理的目录关闭。
递归地删除目录中的文件,使用SHFileOperation函数。
RemoveDirectory删除目录交界处,即使目标的内容不为空,该函数删除目录联接无论目标对象的状态。欲了解更多有关路口的信息,请参阅硬链接和路口。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinBase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode和ANSI namesRemoveDirectoryW(Unicode)和RemoveDirectoryA(ANSI)的
参见
CreateDirectory
创建和删除目录
目录管理功能
RemoveDirectoryTransacted
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年9月3日
==英文原文==RemoveDirectory Function
Deletes an existing empty directory.
To perform this operation as a transacted operation, use the RemoveDirectoryTransacted function.
Syntax
C++
BOOL WINAPI RemoveDirectory(
__in LPCTSTR lpPathName
);
Parameters
lpPathName [in]
The path of the directory to be removed. This path must specify an empty directory, and the calling process must have delete access to the directory.
In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "\\\\?\\" to the path. For more information, see Naming a File .
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
The RemoveDirectory function marks a directory for deletion on close. Therefore, the directory is not removed until the last handle to the directory is closed.
To recursively delete the files in a directory, use the SHFileOperation function.
RemoveDirectory removes a directory junction, even if the contents of the target are not empty; the function removes directory junctions regardless of the state of the target object. For more information on junctions, see Hard Links and Junctions .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinBase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode and ANSI namesRemoveDirectoryW (Unicode) and RemoveDirectoryA (ANSI)
See Also
CreateDirectory
Creating and Deleting Directories
Directory Management Functions
RemoveDirectoryTransacted
Send comments about this topic to Microsoft
Build date: 9/3/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa365488(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:24:05