Group: File Management - Library: kernel32
BOOL WINAPI SetFilePointerEx(
HANDLE hFile,
LARGE_INTEGER liDistanceToMove,
PLARGE_INTEGER lpNewFilePointer,
DWORD dwMoveMethod
);
DECLARE INTEGER SetFilePointerEx IN kernel32;
INTEGER hFile,;
LONG liDistanceToMoveLo,;
LONG liDistanceToMoveHi,;
STRING @lpNewFilePointer,;
LONG dwMoveMethod
hFile [in] A handle to the file. The file handle must have been created with the GENERIC_READ or GENERIC_WRITE access right.
liDistanceToMove [in] The number of bytes to move the file pointer.
lpNewFilePointer [out, optional] A pointer to a variable to receive the new file pointer.
dwMoveMethod [in] The starting point for the file pointer move.
If the function succeeds, the return value is nonzero.
Note that the number of parameters is different in C and VFP declarations for this function.
My first intention was to declare the second parameter, liDistanceToMove, as STRING @, which is the pointer to string. This approach worked in similar situations before but failed in this particular case.
Calvin Hsia in his blog's entry explains why this function must be declared in VFP with rather five input parameters versus four regular ones.
The long integer (8 bytes) input parameter liDistanceToMove is passed to this function as two separate input parameters of LONG type (4 bytes each).