- Operating mode in Windows Vista (and later)
In french: fChargeBuffer
Loads the content of an external file (text, image, ...) in a buffer variable.
<Result> = fLoadBuffer(<External file> [, <Position> [, <Size>]])
Content of text file.
<External file>: Character string
Name and full (or relative) path of external file (text, image, ...). A UNC path can be used. This file is not necessarily a file in TXT format: indeed, the binary zeros are allowed.
The file path corresponds to a full path or to a path relative to the current directory (returned by fCurrentDir
). This parameter is case-sensitive. Reminder
: On iPhone/iPad, the file system is read-only on the device and on the emulator. An application can only write to its setup directory or one of its subdirectories.
<Position>: Optional integer
Position from which the text file must be loaded. This position is expressed in bytes (or in number of characters).
This parameters corresponds to 0 (beginning of file) by default.
<Size>: Optional integer
Maximum size of the file to load. This size is expressed in bytes (or in number of characters).
By default, this size corresponds to the total size of the file.
Operating mode in Windows Vista (and later)
If this function does not operate properly in Windows Vista (and later), check whether the file or directory used is not in one of the system directories (Windows directory or "Program Files" directory).
In Windows Vista (and later), with the UAC mechanism (User Account Control) enabled
, you must have administrator privileges to handle and/or modify the files or directories in system directories (Windows directory or "Program Files" directory).
Programming tip: To handle and/or modify the files or directories without administrator privileges, you should:
- avoid writing to the Windows directory or to the "Program Files" directory,
- use the system directory of the application (returned by SysDir with the srAppDataCommun constant, for example).
This page is also available for…