Open
Valid for: CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DE NoteA relative filename must be passed to this function. The absolute filename is determined by means of a search procedure. First a search is made to determine whether the given file is located in a directory of the databases. If the desired file is not found the active configuration directory is used.
Constructor Syntax
file(char [] filename, dword access, dword mode); // form 1file(char [] filename, dword access, dword mode, dword fileEncoding); // form 2
Method Syntax (Dynamic)
long File::Open(char filename[], dword access, dword mode); // form 1long File::Open(char filename[], dword access, dword mode, dword fileEncoding); // form 2
Description
This function opens the filename file.- If
access = 0, the file is opened for write access;
ifaccess = 1the file is opened for read access. - Use
mode = 0to open the file in text mode;
Usemode = 1to open the file in binary mode; - Use
mode = 2to append data at the end of the file in text mode;
Usemode = 3to append data at the end of the file in binary mode;
Parameters
- filename: The name of the file
- access: 0 for write access, 1 for read access
- mode: 0 for text mode, 1 for binary mode, 2 for append in text mode, 3 for append in binary mode. Appending requires write access.
- fileEncoding: Identifier of the Microsoft code page that is used to encode the file.
Return Values
- — (constructor)
-
0 on success, 0 on error (method)