Kernel32BackupSeek Method

Seeks forward in a data stream initially accessed by using the BackupRead(SafeFileHandle, IntPtr, UInt32, UInt32, Boolean, Boolean, IntPtr) or BackupWrite function.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", SetLastError = true)]
public static bool BackupSeek(
	SafeFileHandle hFile,
	uint lowBytesToSeek,
	uint highBytesToSeek,
	ref uint refLowByteSeeked,
	ref uint refHighByteSeeked,
	ref IntPtr refContext
)

Parameters

hFile  SafeFileHandle
Handle to the file or directory. This handle is created by using the CreateFile(String, FileAccessRights, FileShare, IntPtr, FileMode, CreateFileFlags, IntPtr) function.

The handle must be synchronous (nonoverlapped). This means that the Overlapped flag must not be set when CreateFile(String, FileAccessRights, FileShare, IntPtr, FileMode, CreateFileFlags, IntPtr) 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.

lowBytesToSeek  UInt32
Low-order part of the number of bytes to seek.
highBytesToSeek  UInt32
High-order part of the number of bytes to seek.
refLowByteSeeked  UInt32
Receives the low-order bits of the number of bytes the function actually seeks.
refHighByteSeeked  UInt32
Receives the high-order bits of the number of bytes the function actually seeks.
refContext  IntPtr
Pointer to an internal data structure used by the function.

This structure must be the same structure that was initialized by the BackupRead(SafeFileHandle, IntPtr, UInt32, UInt32, Boolean, Boolean, IntPtr) or BackupWrite function.

An application must not touch the contents of this structure.

Return Value

Boolean
If the function could seek the requested amount, the return value is .

If the function could not seek the requested amount, the return value is .

To get extended error information, call GetLastWin32Error.

Remarks

See Also