Syntax
VM_RESULT vm_fs_seek(
    VM_FS_HANDLE handle, 
    VMINT offset, 
    VM_FS_BASE_POSITION base
);
ContentsIndex
PreviousUpNext
vm_fs_seek
Syntax
VM_RESULT vm_fs_seek(
    VM_FS_HANDLE handle, 
    VMINT offset, 
    VM_FS_BASE_POSITION base
);
Description

Moves the file pointer to a specific position. If the specified position exceeds the size of the file, an error will be returned. If the function succeeds, the return value is the new file pointer value, 

Moving the file pointer before the beginning of the file is an error. However, moving the file pointer beyond the current file size is supported. In this case, the file is extended. The data between the previous file size and the new file size is undefined. This method is used to extend a file, which is a much faster way than actually writing data to it.

Parameters
Parameters 
Description 
VM_FS_HANDLE handle 
[IN] The file handle of the file to be operated on. 
VMINT offset 
[IN] The number of bytes to move. 
VM_FS_BASE_POSITION base 
[IN] The base position where the file pointer will move from. VM_FS_BASE_BEGINNING means from begin of file; VM_FS_BASE_CURRENT means from current position; VM_FS_BASE_END means from end of file. 
Returns

If succeeds, a positive integer is returned, which is the new position 

(base +/- offset) of the file pointer points to. 

If a negative integer is returned, refer to VM_FS_RESULT for error details. 

If the value of the resulting file pointer is larger than 2^(31)-1, 

VM_FS_LONG_FILE_POS is returned.

File

vmfs.h

Group
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.