From ce336586bac7841b046fbb2ff908c98075dc529c Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Sat, 24 Jul 2004 10:42:55 +0000 Subject: [PATCH] implementation of TouchFileTimes(), Thanks to Florian Stinglmayr for submitting a rough draft ;) svn path=/trunk/; revision=10279 --- reactos/lib/imagehlp/imagehlp_main.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/reactos/lib/imagehlp/imagehlp_main.c b/reactos/lib/imagehlp/imagehlp_main.c index 7526476fde9..89e3c857768 100644 --- a/reactos/lib/imagehlp/imagehlp_main.c +++ b/reactos/lib/imagehlp/imagehlp_main.c @@ -138,12 +138,17 @@ BOOL WINAPI SearchTreeForFile( /*********************************************************************** * 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)); }