网站首页  词典首页

请输入您要查询的函数:

 

术语 backupread
释义 BackupRead
语法:
C++
BOOL BackupRead(
__in HANDLE hFile,
__out LPBYTE lpBuffer,
__in DWORD nNumberOfBytesToRead,
__out LPDWORD lpNumberOfBytesRead,
__in BOOL bAbort,
__in BOOL bProcessSecurity,
__out LPVOID *lpContext
);
BackupRead功能
该BackupRead函数可用于备份文件或目录,包括安全信息。该函数读取一个指定的文件或到缓冲区中,然后可以写入到备份媒体使用WriteFile函数目录相关的数据。
参数
hFile [in]
处理的文件或目录进行备份。要获取处理,调用CreateFile函数。该SACLs不是只读文件句柄,除非是与ACCESS_SYSTEM_SECURITY访问权限创建。有关更多信息,请参阅文件安全性和访问权限。
句柄必须同步(同步方式)。这意味着FILE_FLAG_OVERLAPPED标志不得时设置CreateFile调用。此函数不验证它接收的处理是同步的,因此它不返回错误代码的同步处理,而是一个异步调用(重叠它)处理可以细微的错误结果,是很难调试。
该BackupRead函数可能会失败CreateFile是与国旗FILE_FLAG_NO_BUFFERING要求。在这种情况下,GetLastError函数返回值ERROR_INVALID_PARAMETER。
lpBuffer [out]
指针的缓冲区接收数据。
nNumberOfBytesToRead [in]
长度的缓冲区,以字节为单位。缓冲区的大小必须大于1 WIN32_STREAM_ID结构的大小。
lpNumberOfBytesRead [out]
指针变量,它接收读取的字节数。
如果该函数返回一个非零值,和变量指向lpNumberOfBytesRead是零,那么所有的数据与文件句柄关联已被读取。
bAbort [in]
指示是否使用完的处理BackupRead。当您备份文件,指定此参数为FALSE。一旦您使用完BackupRead,必须调用BackupRead一个更多的时间,指定此参数为TRUE,并通过适当lpContext。 lpContext必须通过bAbort为TRUE时,所有其他参数将被忽略。
bProcessSecurity [in]
指示是否会恢复功能,访问控制列表(ACL)的文件或目录的数据。
如果bProcessSecurity为TRUE,在ACL数据进行备份。
lpContext [out]
指针变量接收一个指向内部数据结构BackupRead用于维护备份操作过程中的上下文信息。
您必须设置变量所指向的lpContext为NULL在第一次调用BackupRead指定的文件或目录。函数分配的内存数据结构,然后设置变量指向的结构。您不得改变lpContext或变量,它指向呼吁BackupRead之间。
要释放的数据结构使用的内存,请设置为TRUE时,备份操作完成bAbort参数BackupRead。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零,表明一个I / O错误。为了获得更多错误信息,调用GetLastError。
备注
此功能不用于备份下的加密文件系统加密文件的使用。使用ReadEncryptedFileRaw用于这一目的。
如果发生错误时BackupRead读取数据,可以跳过调用进程通过调用函数BackupSeek坏数据。
文件或目录应该恢复使用BackupWrite功能。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
BackupWrite
BackupSeek
创建一个备份应用程序
ReadEncryptedFileRaw
WIN32_STREAM_ID
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==BackupRead Function
The BackupRead function can be used to back up a file or directory, including the security information. The function reads data associated with a specified file or directory into a buffer, which can then be written to the backup medium using the WriteFile function.
Syntax
C++
BOOL BackupRead(
__in HANDLE hFile,
__out LPBYTE lpBuffer,
__in DWORD nNumberOfBytesToRead,
__out LPDWORD lpNumberOfBytesRead,
__in BOOL bAbort,
__in BOOL bProcessSecurity,
__out LPVOID *lpContext
);
Parameters
hFile [in]
Handle to the file or directory to be backed up. To obtain the handle, call the CreateFile function. The SACLs are not read unless the file handle was created with the ACCESS_SYSTEM_SECURITY access right. For more information, see File Security and Access Rights .
The handle must be synchronous (nonoverlapped). This means that the FILE_FLAG_OVERLAPPED flag must not be set when CreateFile is called. This function does not validate that the handle it receives is synchronous, so it does not return an error code for a synchronous handle, but calling it with an asynchronous (overlapped) handle can result in subtle errors that are very difficult to debug.
The BackupRead function may fail if CreateFile was called with the flag FILE_FLAG_NO_BUFFERING. In this case, the GetLastError function returns the value ERROR_INVALID_PARAMETER.
lpBuffer [out]
Pointer to a buffer that receives the data.
nNumberOfBytesToRead [in]
Length of the buffer, in bytes. The buffer size must be greater than the size of a WIN32_STREAM_ID structure.
lpNumberOfBytesRead [out]
Pointer to a variable that receives the number of bytes read.
If the function returns a nonzero value, and the variable pointed to by lpNumberOfBytesRead is zero, then all the data associated with the file handle has been read.
bAbort [in]
Indicates whether you have finished using BackupRead on the handle. While you are backing up the file, specify this parameter as FALSE. Once you are done using BackupRead, you must call BackupRead one more time specifying TRUE for this parameter and passing the appropriate lpContext. lpContext must be passed when bAbort is TRUE; all other parameters are ignored.
bProcessSecurity [in]
Indicates whether the function will restore the access-control list (ACL) data for the file or directory.
If bProcessSecurity is TRUE, the ACL data will be backed up.
lpContext [out]
Pointer to a variable that receives a pointer to an internal data structure used by BackupRead to maintain context information during a backup operation.
You must set the variable pointed to by lpContext to NULL before the first call to BackupRead for the specified file or directory. The function allocates memory for the data structure, and then sets the variable to point to that structure. You must not change lpContext or the variable that it points to between calls to BackupRead.
To release the memory used by the data structure, call BackupRead with the bAbort parameter set to TRUE when the backup operation is complete.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero, indicating that an I/O error occurred. To get extended error information, call GetLastError .
Remarks
This function is not intended for use in backing up files encrypted under the Encrypted File System. Use ReadEncryptedFileRaw for that purpose.
If an error occurs while BackupRead is reading data, the calling process can skip the bad data by calling the BackupSeek function.
The file or directory should be restored using the BackupWrite function.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
BackupWrite
BackupSeek
Creating a Backup Application
ReadEncryptedFileRaw
WIN32_STREAM_ID
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa362509(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:40