术语 | encryptiondisable |
释义 | EncryptionDisable 语法: C++ BOOL WINAPI EncryptionDisable( __in LPCWSTR DirPath, __in BOOL Disable ); EncryptionDisable功能 禁用或使加密指定目录及其中的文件。它不会影响下面的说明目录的子目录加密。 参数 DirPath [in] 该目录的启用或停用加密的名称。 禁用 [in] 指示是否禁用加密(TRUE)或使之(假)。 返回值 如果函数成功,返回值为非零。 如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。 备注 在正常情况下,不会EncryptFile的文件进行加密,并与FILE_ATTRIBUTE_SYSTEM目录属性设置。它可以覆盖FILE_ATTRIBUTE_SYSTEM属性和加密文件。此外,如果一个文件或目录与FILE_ATTRIBUTE_SYSTEM属性标记,通常会是看不见的,在目录列表和Windows资源管理目录的Windows用户。 EncryptionDisable禁用加密的目录和文件。它不会影响与知名度的FILE_ATTRIBUTE_SYSTEM文件属性设置。 如果是TRUE传入,EncryptionDisable将写入下列目录中的Desktop.ini文件(创造,如果需要): [加密] 禁用= 1 如果该部分已经存在,但禁用设置为0,它将被设置为1。 此后,EncryptFile的将失败的目录和它的文件,即GetLastError返回将ERROR_DIR_EFS_DISALLOWED代码。此函数不影响在给定目录的子目录加密。 用户还可以手动添加或编辑在上述各行的Desktop.ini文件,并产生同样的效果。 EncryptionDisable只影响FileEncryptionStatus和EncryptFile的。该目录后,加密,任何新的文件和新的子目录下创建的FILE_ATTRIBUTE_SYSTEM属性将被加密。 如果假传入,EncryptionDisable将写入以下的Desktop.ini文件: [加密] 禁用= 0 这意味着,文件加密,是在该目录中的文件允许的。 如果您尝试使用EncryptionDisable设置目录的状态已经在,函数成功,但没有效果。 如果您尝试使用EncryptionDisable禁用或启用一个文件加密,尝试将失败。 要求: 最低支持:client-Windows 2000专业版 最低支持server-Windows 2000服务器 HeaderWinefs.h(头文件:winuser.h) LibraryAdvapi32.lib DLLAdvapi32.dll 参见 文件属性 DecryptFile EncryptFile的 文件加密 文件管理函数 FileEncryptionStatus GetFileAttributes 如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com) 生成日期:2009年9月3日 ==英文原文==EncryptionDisable Function Disables or enables encryption of the specified directory and the files in it. It does not affect encryption of subdirectories below the indicated directory. Syntax C++ BOOL WINAPI EncryptionDisable( __in LPCWSTR DirPath, __in BOOL Disable ); Parameters DirPath [in] The name of the directory for which to enable or disable encryption. Disable [in] Indicates whether to disable encryption (TRUE) or enable it (FALSE). 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 Under normal circumstances, EncryptFile will not encrypt files and directories with the FILE_ATTRIBUTE_SYSTEM attribute set. It is possible to override the FILE_ATTRIBUTE_SYSTEM attribute and encrypt files. Also, if a file or directory is marked with the FILE_ATTRIBUTE_SYSTEM attribute, it will normally be invisible to the user in directory listings and Windows Explorer directory windows. EncryptionDisable disables encryption of directories and files. It does not affect the visibility of files with the FILE_ATTRIBUTE_SYSTEM attribute set. If TRUE is passed in, EncryptionDisable will write the following to the Desktop.ini file in the directory (creating it if necessary): [Encryption] Disable=1 If the section already exists but Disable is set to 0, it will be set to 1. Thereafter, EncryptFile will fail on the directory and the files in it, and the code that GetLastError returns will be ERROR_DIR_EFS_DISALLOWED. This function does not affect encryption of subdirectories within the given directory. The user can also manually add or edit the above lines in the Desktop.ini file and produce the same effect. EncryptionDisable affects only FileEncryptionStatus and EncryptFile . After the directory is encrypted, any new files and new subdirectories created without the FILE_ATTRIBUTE_SYSTEM attribute will be encrypted. If FALSE is passed in, EncryptionDisable will write the following to the Desktop.ini file: [Encryption] Disable=0 This means that file encryption is permitted on the files in that directory. If you try to use EncryptionDisable to set the directory to the state it is already in, the function succeeds but has no effect. If you try to use EncryptionDisable to disable or enable encryption on a file, the attempt will fail. Requirements Minimum supported clientWindows 2000 Professional Minimum supported serverWindows 2000 Server HeaderWinefs.h (include Windows.h) LibraryAdvapi32.lib DLLAdvapi32.dll See Also File Attributes DecryptFile EncryptFile File Encryption File Management Functions FileEncryptionStatus GetFileAttributes Send comments about this topic to Microsoft Build date: 9/3/2009 ==原始网址==http://msdn.microsoft.com/en-us/library/aa364023(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。