DosSetFilePtrL moves the read write pointer according to the type of move specified.
DosSetFilePtrL (hFile, ib, method, ibActual)
- hFile (HFILE) input
- The handle returned by a previous DosOpenL function.
- ib (LONGLONG) input
- The signed distance (offset) to move, in bytes.
- method (ULONG) input
- The method of moving.
- Specifies a location in the file from where the ib to move the read/write pointer starts. The values and their meanings are described in the following list:
- FILE_BEGIN - Move the pointer from the beginning of the file.
- FILE_CURRENT - Move the pointer from the current location of the read write pointer.
- FILE_END - Move the pointer from the end of the file. Use this method to determine a file s size.
- ibActual (PLONGLONG) output
- Address of the new pointer location.
- ulrc (APIRET) returns
- DosSetFilePtrL returns one of the following values:
- 0 NO_ERROR
- 1 ERROR_INVALID_FUNCTION
- 6 ERROR_INVALID_HANDLE
- 132 ERROR_SEEK_ON_DEVICE
- 131 ERROR_NEGATIVE_SEEK
- 130 ERROR_DIRECT_ACCESS_HANDLE
The read/write pointer in a file is a signed 64-bit number. A negative value for ib moves the pointer backward in the file; a positive value moves it forward. DosSetFilePtrL cannot be used to move to a negative position in the file.
DosSetFilePtrL cannot be used for a character device or pipe.