DosSetFilePtrL: Difference between revisions
Appearance
m →Syntax |
mNo edit summary |
||
Line 1: | Line 1: | ||
DosSetFilePtrL moves the read write pointer according to the type of move specified. | DosSetFilePtrL moves the read write pointer according to the type of move specified. | ||
==Syntax== | ==Syntax== | ||
DosSetFilePtrL (hFile, ib, method, ibActual) | |||
==Parameters== | ==Parameters== | ||
;hFile HFILE) input : The handle returned by a previous DosOpenL function. | ;hFile ([[HFILE]]) input : The handle returned by a previous [[DosOpenL]] function. | ||
;ib LONGLONG) input : The signed distance (offset) to move, in bytes. | ;ib ([[LONGLONG]]) input : The signed distance (offset) to move, in bytes. | ||
;method ULONG) input : The method of moving. | ;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: | :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_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_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. | :*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. | ; ibActual (PLONGLONG) output : Address of the new pointer location. | ||
==Return Code== | ==Return Code== | ||
ulrc APIRET) returns | ulrc ([[APIRET]]) returns | ||
DosSetFilePtrL returns one of the following values: | DosSetFilePtrL returns one of the following values: | ||
Line 32: | Line 26: | ||
==Remarks== | ==Remarks== | ||
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. | 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. | |||
==Related Functions== | ==Related Functions== |
Revision as of 14:05, 14 June 2017
DosSetFilePtrL moves the read write pointer according to the type of move specified.
Syntax
DosSetFilePtrL (hFile, ib, method, ibActual)
Parameters
- 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.
Return Code
ulrc (APIRET) returns
DosSetFilePtrL returns one of the following values:
- 0 NO_ERROR
- ERROR_INVALID_FUNCTION
- ERROR_INVALID_HANDLE
- 132 ERROR_SEEK_ON_DEVICE
- 131 ERROR_NEGATIVE_SEEK
- 130 ERROR_DIRECT_ACCESS_HANDLE
Remarks
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.