I have an application where I need to open an xml file, modify it, and close it again. When I test the code on a laptop running Windows Vista, it works perfectly, but under Windows XP I can't even open the file for read/write access:
errno_t _wfopen_s(&inStream, m_fileName, L"r+, ccs = UTF-8");
...without getting an error code 13, "Permission denied" (although the file will open without any problems if I select "r" rather than "r+' to specify read-only access). Yet the permissions on the file are all set appropriately, as far as I can see, and the file can be opened and modified from the GUI without difficulty.
What could possibly be causing this? Any suggestions would be welcome.