Absolute file path error in Win7

 

I'm trying to open a file using FileOpen() function in Win7 (running the terminal as a administrator) but I'm getting a "absolute file path not allowed" error.

Does anybody has any idea of how to solve this matter?


Thanks

Rodrigo

 

int FileOpen( string filename, int mode, int delimiter=';')
Opens file for input and/or output. Returns a file handle for the opened file or -1 (if the function fails). To get the detailed error information, call GetLastError() function.
Notes: Files can only be opened in the terminal_directory\experts\files folder (terminal_directory\tester\files if for expert testing)
or in its subfolders.
FILE_BIN and FILE_CSV modes cannot be used simultaneously.
If FILE_WRITE does not combine with FILE_READ, a zero-length file will be opened. If even the file containd some data, they will be deleted. If there is a need to add data to an existing file, it must be opened using combination of FILE_READ | FILE_WRITE.
If FILE_READ does not combine with FILE_WRITE, the file will be opened only if it already exists. If the file does not exist, it can be created using the FILE_WRITE mode.
No more than 32 files can be opened within an executable module simultaneously. Handles of files opened in the same module cannot be passed to other modules (libraries).

 
qjol:

Notes: Files can only be opened in the terminal_directory\experts\files folder (terminal_directory\tester\files if for expert testing) or in its subfolders.

There's a number of pieces of code on this forum using the Win32 API to provide access to files anywhere on disk. For example, https://www.mql5.com/en/forum/118999.
 
jjc:
There's a number of pieces of code on this forum using the Win32 API to provide access to files anywhere on disk. For example, https://www.mql5.com/en/forum/118999.


thanks a lot good to learn new things

edit: But I noticed it was not with the FileOpen() function

 

Thanks gjol.

That was the problem. The file wasn't on terminal_directory\experts\files

Reason: