mirror of
https://github.com/reactos/reactos.git
synced 2024-11-04 22:00:55 +00:00
71 lines
2 KiB
C
71 lines
2 KiB
C
|
|
||
|
#include "k32_vista.h"
|
||
|
|
||
|
#include <ndk/rtlfuncs.h>
|
||
|
#include <ndk/iofuncs.h>
|
||
|
|
||
|
/* Taken from Wine kernel32/file.c */
|
||
|
|
||
|
/***********************************************************************
|
||
|
* GetFileInformationByHandleEx (KERNEL32.@)
|
||
|
*/
|
||
|
BOOL WINAPI GetFileInformationByHandleEx( HANDLE handle, FILE_INFO_BY_HANDLE_CLASS class,
|
||
|
LPVOID info, DWORD size )
|
||
|
{
|
||
|
NTSTATUS status;
|
||
|
IO_STATUS_BLOCK io;
|
||
|
|
||
|
switch (class)
|
||
|
{
|
||
|
case FileStreamInfo:
|
||
|
case FileCompressionInfo:
|
||
|
case FileAttributeTagInfo:
|
||
|
case FileRemoteProtocolInfo:
|
||
|
case FileFullDirectoryInfo:
|
||
|
case FileFullDirectoryRestartInfo:
|
||
|
case FileStorageInfo:
|
||
|
case FileAlignmentInfo:
|
||
|
case FileIdInfo:
|
||
|
case FileIdExtdDirectoryInfo:
|
||
|
case FileIdExtdDirectoryRestartInfo:
|
||
|
//FIXME( "%p, %u, %p, %u\n", handle, class, info, size );
|
||
|
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
|
||
|
return FALSE;
|
||
|
|
||
|
case FileBasicInfo:
|
||
|
status = NtQueryInformationFile( handle, &io, info, size, FileBasicInformation );
|
||
|
break;
|
||
|
|
||
|
case FileStandardInfo:
|
||
|
status = NtQueryInformationFile( handle, &io, info, size, FileStandardInformation );
|
||
|
break;
|
||
|
|
||
|
case FileNameInfo:
|
||
|
status = NtQueryInformationFile( handle, &io, info, size, FileNameInformation );
|
||
|
break;
|
||
|
|
||
|
case FileIdBothDirectoryRestartInfo:
|
||
|
case FileIdBothDirectoryInfo:
|
||
|
status = NtQueryDirectoryFile( handle, NULL, NULL, NULL, &io, info, size,
|
||
|
FileIdBothDirectoryInformation, FALSE, NULL,
|
||
|
(class == FileIdBothDirectoryRestartInfo) );
|
||
|
break;
|
||
|
|
||
|
case FileRenameInfo:
|
||
|
case FileDispositionInfo:
|
||
|
case FileAllocationInfo:
|
||
|
case FileIoPriorityHintInfo:
|
||
|
case FileEndOfFileInfo:
|
||
|
default:
|
||
|
SetLastError( ERROR_INVALID_PARAMETER );
|
||
|
return FALSE;
|
||
|
}
|
||
|
|
||
|
if (status != STATUS_SUCCESS)
|
||
|
{
|
||
|
SetLastError( RtlNtStatusToDosError( status ) );
|
||
|
return FALSE;
|
||
|
}
|
||
|
return TRUE;
|
||
|
}
|