网站首页  词典首页

请输入您要查询的函数:

 

术语 duplicateencryptioninfofile
释义 DuplicateEncryptionInfoFile
语法:
C++
DWORD WINAPI DuplicateEncryptionInfoFile(
__in LPCTSTR SrcFileName,
__in LPCTSTR DstFileName,
__in DWORD dwCreationDistribution,
__in DWORD dwAttributes,
__in_opt const LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
DuplicateEncryptionInfoFile功能
副本的EFS从一个文件或目录到另一个数据。
参数
SrcFileName [in]
该文件或目录从中EFS的数据是要复制的名字。这个源文件或目录必须加密。
DstFileName [in]
该文件或目录的元数据的EFS要复制的名字。
这个目标文件或目录不必之前调用此函数加密,但是如果成功完成这一职能,将被加密。
如果SrcFileName值指定了一个文件,这个参数的值还必须指定一个文件,同样的目录。如果一个文件或与此参数指定不存在,一个文件或目录的名称目录(SrcFileName是否指定了一个文件或目录而定)将被创建。
dwCreationDistribution [in]
描述了目标文件或DstFileName参数值确定的目录将被打开。以下是此参数的有效值。
ValueMeaning
CREATE_ALWAYS
2Always创建目标文件或目录。在此参数比CREATE_NEW通过任何其他值将被处理为CREATE_ALWAYS。
CREATE_NEW
1Create目标文件或目录只有当它不存在。如果它存在,并指定此值,这个函数将失败。
dwAttributes [in]
文件属性的目标文件或目录。该FILE_READ_ONLY属性目前无法处理此功能。
lpSecurityAttributes [中,可选]
一个 SECURITY_ATTRIBUTES结构,指定安全指针属性的目标文件或目录,如果它不存在。如果指定NULL,则文件或目录获取默认的安全描述。在一个文件的默认安全描述符的ACL或目录都继承自它的父目录。
返回值
如果函数成功,返回值是ERROR_SUCCESS。
如果函数失败,返回值是一个系统错误代码。对于一个错误代码的完整列表,请参见系统错误代码或Winerror.h中的头文件。
备注
独占访问目标文件或目录的要求这个函数调用EFS的。如果这个访问是没有提供,这个函数将失败。
打电话者应该有EFS的关键源文件或目录,并至少为源文件或目录READ_ATTRIBUTE的ACL。
指定的源和目标文件或目录应该驻留在同一台计算机上,否则,错误将被返回。
要求:
最低支持client-Windows XP
最低支持serverWindows服务器2003
HeaderWinefs.h(头文件:winuser.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
参见
文件加密
文件管理函数
SECURITY_ATTRIBUTES
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年9月3日
==英文原文==DuplicateEncryptionInfoFile Function
Copies the EFS metadata from one file or directory to another.
Syntax
C++
DWORD WINAPI DuplicateEncryptionInfoFile(
__in LPCTSTR SrcFileName,
__in LPCTSTR DstFileName,
__in DWORD dwCreationDistribution,
__in DWORD dwAttributes,
__in_opt const LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
Parameters
SrcFileName [in]
The name of the file or directory from which the EFS metadata is to be copied. This source file or directory must be encrypted.
DstFileName [in]
The name of the file or directory to which the EFS metadata is to be copied.
This destination file or directory does not have to be encrypted before the call to this function; however if this function completes successfully, it will be encrypted.
If the value of SrcFileName specifies a file, the value of this parameter must also specify a file, and likewise for directories. If a file or directory with the name specified by this parameter does not exist, a file or directory (depending on whether SrcFileName specifies a file or directory) will be created.
dwCreationDistribution [in]
Describes how the destination file or directory identified by the DstFileName parameter value is to be opened. The following are the valid values of this parameter.
ValueMeaning
CREATE_ALWAYS
2Always create the destination file or directory. Any value passed in this parameter other than CREATE_NEW will be processed as CREATE_ALWAYS.
CREATE_NEW
1Create the destination file or directory only if it does not already exist. If it does exist, and this value is specified, this function will fail.

dwAttributes [in]
The file attributes of the destination file or directory. The FILE_READ_ONLY attribute is currently not processed by this function.
lpSecurityAttributes [in, optional]
A pointer to a SECURITY_ATTRIBUTES structure that specifies the security attributes of the destination file or directory, if it does not already exist. If you specify NULL, the file or directory gets a default security descriptor. The ACLs in the default security descriptor for a file or directory are inherited from its parent directory.
Return Value
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a system error code. For a complete list of error codes, see System Error Codes or the header file WinError.h.
Remarks
Exclusive access to the destination file or directory is required by EFS for the call to this function. If this access is not provided, this function will fail.
The caller should have the EFS key for the source file or directory, and at least the READ_ATTRIBUTE ACL for the source file or directory.
The specified source and destination file or directories should reside on the same computer; otherwise, an error will be returned.
Requirements
Minimum supported clientWindows XP
Minimum supported serverWindows Server 2003
HeaderWinefs.h (include Windows.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
See Also
File Encryption
File Management Functions
SECURITY_ATTRIBUTES
Send comments about this topic to Microsoft
Build date: 9/3/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa364011(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 11:24:09