SeekBytes
InstallShield 2024 » InstallScript Language Reference
The SeekBytes function repositions the file pointer within an open binary file. You can move the file pointer a specific number of bytes relative to its current position or relative to the beginning or end of the file.
Note:Before calling SeekBytes, you must open the file (which can be a file on the Internet) in binary mode by calling OpenFileMode and OpenFile. When you are finished writing bytes to the file, call CloseFile to close the file.
Syntax
SeekBytes ( nFileHandle, nBytes, nPosition );
Parameters
Parameter |
Description |
|||||||||
nFileHandle |
Specifies the file handle of a file that has been opened in binary mode. |
|||||||||
nBytes |
Specifies the number of bytes to move the file pointer relative to the position specified by nPosition. If nBytes is a positive number, the file pointer is moved toward the end of the file. If nBytes is a negative number, the file pointer is moved toward the beginning of the file. |
|||||||||
nPosition |
Specifies the location in the file from which to move the pointer nBytes. Pass one of the following predefined constants in this parameter:
|
Return Values
Return Value |
Description |
0 |
Indicates that the function successfully repositioned the pointer. |
< 0 |
Indicates that the function was unable to reposition the pointer. |
See Also