Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
en:docs:fapi:doschgfileptr [2021/08/20 03:22] – prokushev | en:docs:fapi:doschgfileptr [2021/09/17 04:31] (current) – prokushev | ||
---|---|---|---|
Line 4: | Line 4: | ||
This call moves the read/write pointer in accordance with the type of move specified. | This call moves the read/write pointer in accordance with the type of move specified. | ||
- | ==Syntax== | + | ===== Syntax |
- | | + | <code c> |
+ | DosChgFilePtr (FileHandle, | ||
+ | </ | ||
+ | |||
+ | ===== Parameters ===== | ||
- | ==Parameters== | ||
- | * FileHandle ([[HFILE]]) - input : Handle returned by a previous DosOpen call. | + | * FileHandle ([[HFILE]]) - input : Handle returned by a previous |
* Distance ([[LONG]]) - input : The offset to move, in bytes. | * Distance ([[LONG]]) - input : The offset to move, in bytes. | ||
* MoveType ([[USHORT]]) - input : Method of moving. Specifies a location in the file from where Distance to move the read/write pointer starts. Values and their meanings are: | * MoveType ([[USHORT]]) - input : Method of moving. Specifies a location in the file from where Distance to move the read/write pointer starts. Values and their meanings are: | ||
Line 21: | Line 24: | ||
* NewPointer ([[PULONG]]) - output : Address of the new pointer location. | * NewPointer ([[PULONG]]) - output : Address of the new pointer location. | ||
- | ==Return Code== | + | ===== Return Code ===== |
rc ([[USHORT]]) - return | rc ([[USHORT]]) - return | ||
Line 31: | Line 34: | ||
* 6 ERROR_INVALID_HANDLE | * 6 ERROR_INVALID_HANDLE | ||
- | ==Remarks== | + | ===== Remarks ===== |
The read/write pointer in a file is a signed 32-bit number. A negative value moves the pointer backward in the file. A positive value moves the pointer forward. DosChgFilePtr cannot be used to seek to a negative position in the file. | The read/write pointer in a file is a signed 32-bit number. A negative value moves the pointer backward in the file. A positive value moves the pointer forward. DosChgFilePtr cannot be used to seek to a negative position in the file. | ||
This call may not be used for a character device or pipe. | This call may not be used for a character device or pipe. | ||
- | ==Example Code== | + | ===== Example Code ===== |
- | ===C Binding=== | + | |
+ | ==== C Binding ==== | ||
<code c> | <code c> | ||
#define INCL_DOSFILEMGR | #define INCL_DOSFILEMGR | ||
Line 100: | Line 106: | ||
</ | </ | ||
- | ===MASM Binding=== | + | ==== MASM Binding ==== |
<code asm> | <code asm> | ||
EXTRN DosChgFilePtr: | EXTRN DosChgFilePtr: | ||
Line 114: | Line 121: | ||
- | == Note === | + | ===== Note ===== |
Text based on http:// | Text based on http:// |