1
Vote

SetDeviceFileTime not implemented properly

description

The RapiFileTime Enumeration results in setting the selected time attributes, and forcing all the others to 0.

To fix my particular case, I added:

case RAPIFileTime.All:
                if (!Convert.ToBoolean(CeSetFileTime(hFile, ref ft, ref ft, ref ft)))
                {
                    CeCloseHandle(hFile);
                    throw new RAPIException("Could not get file time");
                }
                break;
whichever one is chosen , it should leave the other two attributes alone rather than forcing them to 0, which translates to Dec 31, 1899.
I was writing a remote file for an application that monitors an .ini file for changes, and 0 for Create or Last modified date attributes cases the application (Intermec Launcher) to Crash.

comments