reactos/lib/imagehlp
diff -u -r1.2 -r1.3
--- imagehlp_main.c 26 Apr 2004 20:24:04 -0000 1.2
+++ imagehlp_main.c 24 Jul 2004 10:42:55 -0000 1.3
@@ -138,12 +138,17 @@
/***********************************************************************
* TouchFileTimes (IMAGEHLP.@)
*/
-BOOL WINAPI TouchFileTimes(
- HANDLE FileHandle, LPSYSTEMTIME lpSystemTime)
+BOOL WINAPI TouchFileTimes(HANDLE FileHandle, LPSYSTEMTIME lpSystemTime)
{
- FIXME("(%p, %p): stub\n",
- FileHandle, lpSystemTime
- );
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
+ FILETIME FileTime;
+ SYSTEMTIME SystemTime;
+
+ if(lpSystemTime == NULL)
+ {
+ GetSystemTime(&SystemTime);
+ lpSystemTime = &SystemTime;
+ }
+
+ return (SystemTimeToFileTime(lpSystemTime, &FileTime) &&
+ SetFileTime(FileHandle, NULL, NULL, &FileTime));
}