diff --git a/reactos/lib/kernel32/file/file.c b/reactos/lib/kernel32/file/file.c index bf82d3ed03b..a3741f7a976 100644 --- a/reactos/lib/kernel32/file/file.c +++ b/reactos/lib/kernel32/file/file.c @@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.56 2004/07/24 01:27:54 navaraf Exp $ +/* $Id: file.c,v 1.57 2004/09/06 15:56:25 weiden Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -623,9 +623,15 @@ GetFileInformationByHandle(HANDLE hFile, } lpFileInformation->dwFileAttributes = (DWORD)FileBasic.FileAttributes; - memcpy(&lpFileInformation->ftCreationTime,&FileBasic.CreationTime,sizeof(LARGE_INTEGER)); - memcpy(&lpFileInformation->ftLastAccessTime,&FileBasic.LastAccessTime,sizeof(LARGE_INTEGER)); - memcpy(&lpFileInformation->ftLastWriteTime, &FileBasic.LastWriteTime,sizeof(LARGE_INTEGER)); + + lpFileInformation->ftCreationTime.dwHighDateTime = FileBasic.CreationTime.u.HighPart; + lpFileInformation->ftCreationTime.dwLowDateTime = FileBasic.CreationTime.u.LowPart; + + lpFileInformation->ftLastAccessTime.dwHighDateTime = FileBasic.LastAccessTime.u.HighPart; + lpFileInformation->ftLastAccessTime.dwLowDateTime = FileBasic.LastAccessTime.u.LowPart; + + lpFileInformation->ftLastWriteTime.dwHighDateTime = FileBasic.LastWriteTime.u.HighPart; + lpFileInformation->ftLastWriteTime.dwLowDateTime = FileBasic.LastWriteTime.u.LowPart; errCode = NtQueryInformationFile(hFile, &IoStatusBlock, diff --git a/reactos/lib/kernel32/file/find.c b/reactos/lib/kernel32/file/find.c index 5c915ad0030..f7800264b10 100644 --- a/reactos/lib/kernel32/file/find.c +++ b/reactos/lib/kernel32/file/find.c @@ -1,4 +1,4 @@ -/* $Id: find.c,v 1.45 2004/08/28 22:07:51 navaraf Exp $ +/* $Id: find.c,v 1.46 2004/09/06 15:56:25 weiden Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -350,15 +350,16 @@ FindFirstFileA ( /* copy data into WIN32_FIND_DATA structure */ lpFindFileData->dwFileAttributes = IData->pFileInfo->FileAttributes; - memcpy (&lpFindFileData->ftCreationTime, - &IData->pFileInfo->CreationTime, - sizeof(FILETIME)); - memcpy (&lpFindFileData->ftLastAccessTime, - &IData->pFileInfo->LastAccessTime, - sizeof(FILETIME)); - memcpy (&lpFindFileData->ftLastWriteTime, - &IData->pFileInfo->LastWriteTime, - sizeof(FILETIME)); + + lpFindFileData->ftCreationTime.dwHighDateTime = IData->pFileInfo->CreationTime.u.HighPart; + lpFindFileData->ftCreationTime.dwLowDateTime = IData->pFileInfo->CreationTime.u.LowPart; + + lpFindFileData->ftLastAccessTime.dwHighDateTime = IData->pFileInfo->LastAccessTime.u.HighPart; + lpFindFileData->ftLastAccessTime.dwLowDateTime = IData->pFileInfo->LastAccessTime.u.LowPart; + + lpFindFileData->ftLastWriteTime.dwHighDateTime = IData->pFileInfo->LastWriteTime.u.HighPart; + lpFindFileData->ftLastWriteTime.dwLowDateTime = IData->pFileInfo->LastWriteTime.u.LowPart; + lpFindFileData->nFileSizeHigh = IData->pFileInfo->EndOfFile.u.HighPart; lpFindFileData->nFileSizeLow = IData->pFileInfo->EndOfFile.u.LowPart; @@ -437,15 +438,16 @@ FindNextFileA ( /* copy data into WIN32_FIND_DATA structure */ lpFindFileData->dwFileAttributes = IData->pFileInfo->FileAttributes; - memcpy (&lpFindFileData->ftCreationTime, - &IData->pFileInfo->CreationTime, - sizeof(FILETIME)); - memcpy (&lpFindFileData->ftLastAccessTime, - &IData->pFileInfo->LastAccessTime, - sizeof(FILETIME)); - memcpy (&lpFindFileData->ftLastWriteTime, - &IData->pFileInfo->LastWriteTime, - sizeof(FILETIME)); + + lpFindFileData->ftCreationTime.dwHighDateTime = IData->pFileInfo->CreationTime.u.HighPart; + lpFindFileData->ftCreationTime.dwLowDateTime = IData->pFileInfo->CreationTime.u.LowPart; + + lpFindFileData->ftLastAccessTime.dwHighDateTime = IData->pFileInfo->LastAccessTime.u.HighPart; + lpFindFileData->ftLastAccessTime.dwLowDateTime = IData->pFileInfo->LastAccessTime.u.LowPart; + + lpFindFileData->ftLastWriteTime.dwHighDateTime = IData->pFileInfo->LastWriteTime.u.HighPart; + lpFindFileData->ftLastWriteTime.dwLowDateTime = IData->pFileInfo->LastWriteTime.u.LowPart; + lpFindFileData->nFileSizeHigh = IData->pFileInfo->EndOfFile.u.HighPart; lpFindFileData->nFileSizeLow = IData->pFileInfo->EndOfFile.u.LowPart; @@ -541,17 +543,19 @@ FindFirstFileW ( /* copy data into WIN32_FIND_DATA structure */ lpFindFileData->dwFileAttributes = IData->pFileInfo->FileAttributes; - memcpy (&lpFindFileData->ftCreationTime, - &IData->pFileInfo->CreationTime, - sizeof(FILETIME)); - memcpy (&lpFindFileData->ftLastAccessTime, - &IData->pFileInfo->LastAccessTime, - sizeof(FILETIME)); - memcpy (&lpFindFileData->ftLastWriteTime, - &IData->pFileInfo->LastWriteTime, - sizeof(FILETIME)); + + lpFindFileData->ftCreationTime.dwHighDateTime = IData->pFileInfo->CreationTime.u.HighPart; + lpFindFileData->ftCreationTime.dwLowDateTime = IData->pFileInfo->CreationTime.u.LowPart; + + lpFindFileData->ftLastAccessTime.dwHighDateTime = IData->pFileInfo->LastAccessTime.u.HighPart; + lpFindFileData->ftLastAccessTime.dwLowDateTime = IData->pFileInfo->LastAccessTime.u.LowPart; + + lpFindFileData->ftLastWriteTime.dwHighDateTime = IData->pFileInfo->LastWriteTime.u.HighPart; + lpFindFileData->ftLastWriteTime.dwLowDateTime = IData->pFileInfo->LastWriteTime.u.LowPart; + lpFindFileData->nFileSizeHigh = IData->pFileInfo->EndOfFile.u.HighPart; lpFindFileData->nFileSizeLow = IData->pFileInfo->EndOfFile.u.LowPart; + memcpy (lpFindFileData->cFileName, IData->pFileInfo->FileName, IData->pFileInfo->FileNameLength); @@ -592,18 +596,23 @@ FindNextFileW ( /* copy data into WIN32_FIND_DATA structure */ lpFindFileData->dwFileAttributes = IData->pFileInfo->FileAttributes; - memcpy (&lpFindFileData->ftCreationTime, - &IData->pFileInfo->CreationTime, - sizeof(FILETIME)); - memcpy (&lpFindFileData->ftLastAccessTime, - &IData->pFileInfo->LastAccessTime, - sizeof(FILETIME)); - memcpy (&lpFindFileData->ftLastWriteTime, - &IData->pFileInfo->LastWriteTime, - sizeof(FILETIME)); + + lpFindFileData->ftCreationTime.dwHighDateTime = IData->pFileInfo->CreationTime.u.HighPart; + lpFindFileData->ftCreationTime.dwLowDateTime = IData->pFileInfo->CreationTime.u.LowPart; + + lpFindFileData->ftLastAccessTime.dwHighDateTime = IData->pFileInfo->LastAccessTime.u.HighPart; + lpFindFileData->ftLastAccessTime.dwLowDateTime = IData->pFileInfo->LastAccessTime.u.LowPart; + + lpFindFileData->ftLastWriteTime.dwHighDateTime = IData->pFileInfo->LastWriteTime.u.HighPart; + lpFindFileData->ftLastWriteTime.dwLowDateTime = IData->pFileInfo->LastWriteTime.u.LowPart; + lpFindFileData->nFileSizeHigh = IData->pFileInfo->EndOfFile.u.HighPart; lpFindFileData->nFileSizeLow = IData->pFileInfo->EndOfFile.u.LowPart; - memcpy (lpFindFileData->cFileName, + + lpFindFileData->nFileSizeHigh = IData->pFileInfo->EndOfFile.u.HighPart; + lpFindFileData->nFileSizeLow = IData->pFileInfo->EndOfFile.u.LowPart; + + memcpy (lpFindFileData->cFileName, IData->pFileInfo->FileName, IData->pFileInfo->FileNameLength); lpFindFileData->cFileName[IData->pFileInfo->FileNameLength / sizeof(WCHAR)] = 0;