en:docs:fapi:doschgfileptr

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:docs:fapi:doschgfileptr [2020/12/07 01:56] prokusheven:docs:fapi:doschgfileptr [2021/09/17 04:31] (current) prokushev
Line 1: Line 1:
-{{logos:os2.gif?35x35}} {{logos:dos.gif?35x35}}+{{page>en:templates:fapiint}}
 ====== DosChgFilePtr ====== ====== DosChgFilePtr ======
  
 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 =====
  
-  DosChgFilePtr (FileHandle, Distance, MoveType, NewPointer)+<code c> 
 +DosChgFilePtr (FileHandle, Distance, MoveType, NewPointer) 
 +</code> 
 + 
 +===== Parameters =====
  
-==Parameters== 
  
-  * FileHandle ([[HFILE]]) - input : Handle returned by a previous DosOpen call.+  * FileHandle ([[HFILE]]) - input : Handle returned by a previous [[DosOpen]] call.
   * 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=== + 
-</code c>+==== C Binding ===
 + 
 +<code c>
 #define INCL_DOSFILEMGR #define INCL_DOSFILEMGR
  
Line 100: Line 106:
 </code> </code>
  
-===MASM Binding===+==== MASM Binding ===
 <code asm> <code asm>
 EXTRN  DosChgFilePtr:FAR EXTRN  DosChgFilePtr:FAR
Line 114: Line 121:
  
  
-== Note ===+===== Note ===== 
  
 Text based on http://www.edm2.com/index.php/DosChgFilePtr Text based on http://www.edm2.com/index.php/DosChgFilePtr