P
PLS
Environment: Win32 code, Windows XP SP2 current on patches.
I am getting seemingly random failues of the line
FILE *tfh = _wfopen(line, L"w+tSTD, ccs=UTF-16LE");
errno is 13, No permissions, and after the _wfopen GetLastError returns
5, access denied.
The file name in "line" is correct, the working directory is correct,
the line has executed many times before (even with the same filename)
and at the point of failure the named file does not exist.
Oddly, if I breakpoint in the debugger after tfh is tested to be NULL
and set the next statement back to the open, it always works. If I
change the second argument to "w+tSTD, ccs=UTF-16LE" it also always
works.
Does anyone have any thoughts on what the problem is?
I am getting seemingly random failues of the line
FILE *tfh = _wfopen(line, L"w+tSTD, ccs=UTF-16LE");
errno is 13, No permissions, and after the _wfopen GetLastError returns
5, access denied.
The file name in "line" is correct, the working directory is correct,
the line has executed many times before (even with the same filename)
and at the point of failure the named file does not exist.
Oddly, if I breakpoint in the debugger after tfh is tested to be NULL
and set the next statement back to the open, it always works. If I
change the second argument to "w+tSTD, ccs=UTF-16LE" it also always
works.
Does anyone have any thoughts on what the problem is?