..msdn Add comment W32 Constants Translate this page
The SetFilePointer function moves the file pointer of an open file.|
HANDLE hFile, // handle to file
LONG lDistanceToMove, // bytes to move pointer
PLONG lpDistanceToMoveHigh, // bytes to move pointer
DWORD dwMoveMethod // starting point
DECLARE INTEGER SetFilePointer IN kernel32;
[in] Handle to the file whose file pointer is to be moved.
[in] Low-order 32 bits of a signed value that specifies the number of bytes to move the file pointer.
[in] Pointer to the high-order 32 bits of the signed 64-bit distance to move.
[in] Starting point for the file pointer move -- a predefined value.
|If the SetFilePointer function succeeds and lpDistanceToMoveHigh is NULL, the return value is the low-order DWORD of the new file pointer. If lpDistanceToMoveHigh is not NULL, the function returns the low order DWORD of the new file pointer, and puts the high-order DWORD of the new file pointer into the LONG pointed to by that parameter. |
#DEFINE OF_WRITE 1
#DEFINE FILE_BEGIN 0
STORE 0 TO lnSizeLo, lnSizeHi
lcOpenBuffer = Repli(Chr(0), 250)
phLocal = OpenFile(lcTargetFile, @lcOpenBuffer, OF_WRITE)
lnSizeLo = GetFileSize(phLocal, @lnSizeHi)
= SetFilePointer(phLocal, lnSizeLo, lnSizeHi, FILE_BEGIN)
= WriteFile(phLocal, @lcBuffer,;
lnBytesRead, @lnBytesWritten, 0)
|This function stores the file pointer in two LONG values. To work with file pointers that are larger than a single LONG value, it is easier to use the SetFilePointerEx function.|
|Word Index links for the SetFilePointer :|
|Translate this page:|
Visited in last 7 days: 18
|Created: ||2001-11-13 19:43:05|
|Modified: ||2007-08-20 16:36:20|