I need to change the LastWriteTime property in a smart device project (Windows Mobile 6 Professional), so I'm using the Compact Framework. The File class has the support to get the last write time (File.GetLastWriteTime), but the method File.SetLastWriteTime is not supported.
I tried using FileInfo class, and its LastWriteTime property, but it is read only for the Compact Framework.
How can I do?
Set LastWriteTime in the Compact Framework
Moderator: Moderators
Re: Set LastWriteTime in the Compact Framework
I found this on the Web doing a search:
"You probably can P/Invoke SetFileTime() API.
http://msdn.microsoft.com/en-us/library/ms886812.aspx
Call CreateFile() to get file handle, then set time and then call CloseHandle() to release file handle.
This posting is provided "AS IS" with no warranties, and confers no rights."
"You probably can P/Invoke SetFileTime() API.
http://msdn.microsoft.com/en-us/library/ms886812.aspx
Call CreateFile() to get file handle, then set time and then call CloseHandle() to release file handle.
This posting is provided "AS IS" with no warranties, and confers no rights."