mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
1. implemented SetFileValidData()
2. updated FILE_INFORMATION_CLASS svn path=/trunk/; revision=8780
This commit is contained in:
parent
810644856d
commit
7cda28d415
4 changed files with 51 additions and 27 deletions
|
@ -1,6 +1,6 @@
|
||||||
#ifndef __INCLUDE_DDK_FSTYPES_H
|
#ifndef __INCLUDE_DDK_FSTYPES_H
|
||||||
#define __INCLUDE_DDK_FSTYPES_H
|
#define __INCLUDE_DDK_FSTYPES_H
|
||||||
/* $Id: fstypes.h,v 1.14 2004/03/14 09:21:41 weiden Exp $ */
|
/* $Id: fstypes.h,v 1.15 2004/03/18 16:19:25 weiden Exp $ */
|
||||||
|
|
||||||
#ifndef __USE_W32API
|
#ifndef __USE_W32API
|
||||||
|
|
||||||
|
@ -21,6 +21,10 @@ typedef struct _FILE_LINK_INFORMATION {
|
||||||
WCHAR FileName[1];
|
WCHAR FileName[1];
|
||||||
} FILE_LINK_INFORMATION, *PFILE_LINK_INFORMATION;
|
} FILE_LINK_INFORMATION, *PFILE_LINK_INFORMATION;
|
||||||
|
|
||||||
|
typedef struct _FILE_VALID_DATA_LENGTH_INFORMATION {
|
||||||
|
LARGE_INTEGER ValidDataLength;
|
||||||
|
} FILE_VALID_DATA_LENGTH_INFORMATION, *PFILE_VALID_DATA_LENGTH_INFORMATION;
|
||||||
|
|
||||||
typedef NTSTATUS (*PCOMPLETE_LOCK_IRP_ROUTINE) (
|
typedef NTSTATUS (*PCOMPLETE_LOCK_IRP_ROUTINE) (
|
||||||
IN PVOID Context,
|
IN PVOID Context,
|
||||||
IN PIRP Irp
|
IN PIRP Irp
|
||||||
|
|
|
@ -64,19 +64,19 @@ typedef enum _FILE_INFORMATION_CLASS
|
||||||
FileMailslotQueryInformation,
|
FileMailslotQueryInformation,
|
||||||
FileMailslotSetInformation,
|
FileMailslotSetInformation,
|
||||||
FileCompressionInformation,
|
FileCompressionInformation,
|
||||||
FileCopyOnWriteInformation,
|
FileObjectIdInformation,
|
||||||
FileCompletionInformation,
|
FileCompletionInformation,
|
||||||
FileMoveClusterInformation,
|
FileMoveClusterInformation,
|
||||||
FileOleClassIdInformation,
|
FileQuotaInformation,
|
||||||
FileOleStateBitsInformation,
|
FileReparsePointInformation,
|
||||||
FileNetworkOpenInformation,
|
FileNetworkOpenInformation,
|
||||||
FileObjectIdInformation,
|
FileAttributeTagInformation,
|
||||||
FileOleAllInformation,
|
FileTrackingInformation,
|
||||||
FileOleDirectoryInformation,
|
FileIdBothDirectoryInformation,
|
||||||
FileContentIndexInformation,
|
FileIdFullDirectoryInformation,
|
||||||
FileInheritContentIndexInformation,
|
FileValidDataLengthInformation,
|
||||||
FileOleInformation,
|
FileShortNameInformation,
|
||||||
FileMaximumInformation,
|
FileMaximumInformation
|
||||||
} FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
|
} FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
|
||||||
|
|
||||||
typedef enum _SECTION_INHERIT {
|
typedef enum _SECTION_INHERIT {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: file.c,v 1.51 2004/03/14 13:20:10 weiden Exp $
|
/* $Id: file.c,v 1.52 2004/03/18 16:19:25 weiden Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <k32.h>
|
#include <k32.h>
|
||||||
|
#include <ddk/ntifs.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include "../include/debug.h"
|
#include "../include/debug.h"
|
||||||
|
@ -1158,4 +1159,37 @@ SetEndOfFile(HANDLE hFile)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
BOOL
|
||||||
|
STDCALL
|
||||||
|
SetFileValidData(
|
||||||
|
HANDLE hFile,
|
||||||
|
LONGLONG ValidDataLength
|
||||||
|
)
|
||||||
|
{
|
||||||
|
IO_STATUS_BLOCK IoStatusBlock;
|
||||||
|
FILE_VALID_DATA_LENGTH_INFORMATION ValidDataLengthInformation;
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
ValidDataLengthInformation.ValidDataLength.QuadPart = ValidDataLength;
|
||||||
|
|
||||||
|
Status = NtSetInformationFile(
|
||||||
|
hFile,
|
||||||
|
&IoStatusBlock, //out
|
||||||
|
&ValidDataLengthInformation,
|
||||||
|
sizeof(FILE_VALID_DATA_LENGTH_INFORMATION),
|
||||||
|
FileValidDataLengthInformation
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!NT_SUCCESS(Status)){
|
||||||
|
SetLastErrorByStatus(Status);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: stubs.c,v 1.68 2004/03/14 18:16:39 weiden Exp $
|
/* $Id: stubs.c,v 1.69 2004/03/18 16:19:26 weiden Exp $
|
||||||
*
|
*
|
||||||
* KERNEL32.DLL stubs (unimplemented functions)
|
* KERNEL32.DLL stubs (unimplemented functions)
|
||||||
* Remove from this file, if you implement them.
|
* Remove from this file, if you implement them.
|
||||||
|
@ -1393,20 +1393,6 @@ SetCriticalSectionSpinCount(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
BOOL
|
|
||||||
STDCALL
|
|
||||||
SetFileValidData(
|
|
||||||
HANDLE hFile,
|
|
||||||
LONGLONG ValidDataLength
|
|
||||||
)
|
|
||||||
{
|
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue