AIT_FileSetPos

Description

Sets the file pointer at a specified position.

Format

bool AIT_FileSetPos  (
 integer nFileHandle,     // File handle
 integer nSetPos          // New file pointer position
);

Parameters

nFileHandle (input)

Specify a file handle.

nSetPos (input)

Specify a new file pointer position.

Return values

The return value is true if the function was executed normally, and false if not. If the function has returned false, you can use AIT_GetLastError to acquire an extended error code. The following gives the error codes that AIT_GetLastError might return:

Extended error numberError code
5ERROR_ACCESS_DENIED
6ERROR_INVALID_HANDLE
8ERROR_NOT_ENOUGH_MEMORY
14ERROR_OUTOFMEMORY
19ERROR_WRITE_PROTECT
21ERROR_NOT_READY
32ERROR_SHARING_VIOLATION
33ERROR_LOCK_VIOLATION
38ERROR_HANDLE_EOF
87ERROR_INVALID_PARAMETER
112ERROR_DISK_FULL
148ERROR_PATH_BUSY
1231ERROR_NETWORK_UNREACHABLE
1392ERROR_FILE_CORRUPT

Notes

You must not use the file pointer indicated by the nFileHandle parameter value for duplicate reading or writing operations.

If you execute this function with the new file pointer position set at 0, the current file pointer position will be held.