4#define CcIsFileCached(FO) ( \
5 ((FO)->SectionObjectPointer != NULL) && \
6 (((PSECTION_OBJECT_POINTERS)(FO)->SectionObjectPointer)->SharedCacheMap != NULL) \
11#if (NTDDI_VERSION >= NTDDI_WIN2K)
294#if (NTDDI_VERSION >= NTDDI_WINXP)
322#if (NTDDI_VERSION >= NTDDI_WINXP)
334#elif (NTDDI_VERSION >= NTDDI_WIN2K)
347#if (NTDDI_VERSION >= NTDDI_VISTA)
377#if (NTDDI_VERSION >= NTDDI_WIN7)
389#define CcGetFileSizePointer(FO) ( \
390 ((PLARGE_INTEGER)((FO)->SectionObjectPointer->SharedCacheMap) + 1) \
393#if (NTDDI_VERSION >= NTDDI_VISTA)
402#elif (NTDDI_VERSION >= NTDDI_WIN2K)
413#if (NTDDI_VERSION >= NTDDI_WIN7)
422#define CcCopyWriteWontFlush(FO, FOFF, LEN) ((LEN) <= 0x10000)
425#define CcReadAhead(FO, FOFF, LEN) ( \
426 if ((LEN) >= 256) { \
427 CcScheduleReadAhead((FO), (FOFF), (LEN)); \
static CC_FILE_SIZES FileSizes
const struct winhelp_callbacks Callbacks
NTKERNELAPI BOOLEAN NTAPI CcCopyWriteWontFlush(_In_ PFILE_OBJECT FileObject, _In_ PLARGE_INTEGER FileOffset, _In_ ULONG Length)
_In_ PLARGE_INTEGER FileOffset
NTKERNELAPI BOOLEAN NTAPI CcPurgeCacheSection(_In_ PSECTION_OBJECT_POINTERS SectionObjectPointer, _In_opt_ PLARGE_INTEGER FileOffset, _In_ ULONG Length, _In_ ULONG Flags)
NTKERNELAPI PFILE_OBJECT NTAPI CcGetFileObjectFromBcb(_In_ PVOID Bcb)
NTKERNELAPI VOID NTAPI CcSetFileSizes(IN PFILE_OBJECT FileObject, IN PCC_FILE_SIZES FileSizes)
NTKERNELAPI VOID NTAPI CcUnpinData(_In_ PVOID Bcb)
NTKERNELAPI VOID NTAPI CcSetDirtyPinnedData(_In_ PVOID BcbVoid, _In_opt_ PLARGE_INTEGER Lsn)
NTKERNELAPI BOOLEAN NTAPI CcZeroData(_In_ PFILE_OBJECT FileObject, _In_ PLARGE_INTEGER StartOffset, _In_ PLARGE_INTEGER EndOffset, _In_ BOOLEAN Wait)
NTKERNELAPI VOID NTAPI CcSetLogHandleForFile(_In_ PFILE_OBJECT FileObject, _In_ PVOID LogHandle, _In_ PFLUSH_TO_LSN FlushToLsnRoutine)
NTKERNELAPI VOID NTAPI CcMdlWriteComplete(_In_ PFILE_OBJECT FileObject, _In_ PLARGE_INTEGER FileOffset, _In_ PMDL MdlChain)
NTKERNELAPI VOID NTAPI CcMdlReadComplete(_In_ PFILE_OBJECT FileObject, _In_ PMDL MdlChain)
NTKERNELAPI PFILE_OBJECT NTAPI CcGetFileObjectFromSectionPtrs(_In_ PSECTION_OBJECT_POINTERS SectionObjectPointer)
NTKERNELAPI NTSTATUS NTAPI CcSetFileSizesEx(_In_ PFILE_OBJECT FileObject, _In_ PCC_FILE_SIZES FileSizes)
NTKERNELAPI BOOLEAN NTAPI CcPreparePinWrite(_In_ PFILE_OBJECT FileObject, _In_ PLARGE_INTEGER FileOffset, _In_ ULONG Length, _In_ BOOLEAN Zero, _In_ ULONG Flags, _Outptr_ PVOID *Bcb, _Outptr_result_bytebuffer_(Length) PVOID *Buffer)
NTKERNELAPI PFILE_OBJECT NTAPI CcGetFileObjectFromSectionPtrsRef(_In_ PSECTION_OBJECT_POINTERS SectionObjectPointer)
NTKERNELAPI VOID NTAPI CcFastCopyRead(_In_ PFILE_OBJECT FileObject, _In_ ULONG FileOffset, _In_ ULONG Length, _In_ ULONG PageCount, _Out_writes_bytes_(Length) PVOID Buffer, _Out_ PIO_STATUS_BLOCK IoStatus)
NTKERNELAPI VOID NTAPI CcMdlWriteAbort(_In_ PFILE_OBJECT FileObject, _In_ PMDL MdlChain)
NTKERNELAPI BOOLEAN CcIsThereDirtyDataEx(_In_ PVPB Vpb, _In_opt_ PULONG NumberOfDirtyPages)
NTKERNELAPI VOID NTAPI CcFastCopyWrite(_In_ PFILE_OBJECT FileObject, _In_ ULONG FileOffset, _In_ ULONG Length, _In_reads_bytes_(Length) PVOID Buffer)
NTKERNELAPI BOOLEAN NTAPI CcCanIWrite(_In_opt_ PFILE_OBJECT FileObject, _In_ ULONG BytesToWrite, _In_ BOOLEAN Wait, _In_ BOOLEAN Retrying)
NTKERNELAPI VOID NTAPI CcCoherencyFlushAndPurgeCache(_In_ PSECTION_OBJECT_POINTERS SectionObjectPointer, _In_opt_ PLARGE_INTEGER FileOffset, _In_ ULONG Length, _Out_ PIO_STATUS_BLOCK IoStatus, _In_opt_ ULONG Flags)
NTKERNELAPI BOOLEAN NTAPI CcUninitializeCacheMap(_In_ PFILE_OBJECT FileObject, _In_opt_ PLARGE_INTEGER TruncateSize, _In_opt_ PCACHE_UNINITIALIZE_EVENT UninitializeCompleteEvent)
NTKERNELAPI BOOLEAN NTAPI CcPinRead(_In_ PFILE_OBJECT FileObject, _In_ PLARGE_INTEGER FileOffset, _In_ ULONG Length, _In_ ULONG Flags, _Outptr_ PVOID *Bcb, _Outptr_result_bytebuffer_(Length) PVOID *Buffer)
NTKERNELAPI LARGE_INTEGER NTAPI CcGetDirtyPages(_In_ PVOID LogHandle, _In_ PDIRTY_PAGE_ROUTINE DirtyPageRoutine, _In_ PVOID Context1, _In_ PVOID Context2)
NTKERNELAPI VOID NTAPI CcSetParallelFlushFile(_In_ PFILE_OBJECT FileObject, _In_ BOOLEAN EnableParallelFlush)
NTKERNELAPI VOID NTAPI CcMdlRead(_In_ PFILE_OBJECT FileObject, _In_ PLARGE_INTEGER FileOffset, _In_ ULONG Length, _Out_ PMDL *MdlChain, _Out_ PIO_STATUS_BLOCK IoStatus)
NTKERNELAPI VOID NTAPI CcInitializeCacheMap(_In_ PFILE_OBJECT FileObject, _In_ PCC_FILE_SIZES FileSizes, _In_ BOOLEAN PinAccess, _In_ PCACHE_MANAGER_CALLBACKS Callbacks, _In_ PVOID LazyWriteContext)
NTKERNELAPI VOID NTAPI CcUnpinDataForThread(_In_ PVOID Bcb, _In_ ERESOURCE_THREAD ResourceThreadId)
NTKERNELAPI VOID NTAPI CcDeferWrite(_In_ PFILE_OBJECT FileObject, _In_ PCC_POST_DEFERRED_WRITE PostRoutine, _In_ PVOID Context1, _In_ PVOID Context2, _In_ ULONG BytesToWrite, _In_ BOOLEAN Retrying)
NTKERNELAPI BOOLEAN NTAPI CcCopyRead(_In_ PFILE_OBJECT FileObject, _In_ PLARGE_INTEGER FileOffset, _In_ ULONG Length, _In_ BOOLEAN Wait, _Out_writes_bytes_(Length) PVOID Buffer, _Out_ PIO_STATUS_BLOCK IoStatus)
NTKERNELAPI VOID NTAPI CcSetReadAheadGranularity(_In_ PFILE_OBJECT FileObject, _In_ ULONG Granularity)
NTKERNELAPI VOID NTAPI CcPrepareMdlWrite(_In_ PFILE_OBJECT FileObject, _In_ PLARGE_INTEGER FileOffset, _In_ ULONG Length, _Out_ PMDL *MdlChain, _Out_ PIO_STATUS_BLOCK IoStatus)
NTKERNELAPI VOID NTAPI CcRepinBcb(_In_ PVOID Bcb)
_In_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _Outptr_ PVOID * Bcb
NTKERNELAPI VOID NTAPI CcFlushCache(_In_ PSECTION_OBJECT_POINTERS SectionObjectPointer, _In_opt_ PLARGE_INTEGER FileOffset, _In_ ULONG Length, _Out_opt_ PIO_STATUS_BLOCK IoStatus)
NTKERNELAPI VOID NTAPI CcUnpinRepinnedBcb(_In_ PVOID Bcb, _In_ BOOLEAN WriteThrough, _Out_ PIO_STATUS_BLOCK IoStatus)
NTKERNELAPI BOOLEAN NTAPI CcIsThereDirtyData(_In_ PVPB Vpb)
NTKERNELAPI BOOLEAN NTAPI CcPinMappedData(_In_ PFILE_OBJECT FileObject, _In_ PLARGE_INTEGER FileOffset, _In_ ULONG Length, _In_ ULONG Flags, _Inout_ PVOID *Bcb)
NTKERNELAPI NTSTATUS NTAPI CcWaitForCurrentLazyWriterActivity(VOID)
NTKERNELAPI VOID NTAPI CcSetDirtyPageThreshold(_In_ PFILE_OBJECT FileObject, _In_ ULONG DirtyPageThreshold)
NTKERNELAPI PVOID NTAPI CcRemapBcb(_In_ PVOID Bcb)
NTKERNELAPI VOID NTAPI CcSetAdditionalCacheAttributes(_In_ PFILE_OBJECT FileObject, _In_ BOOLEAN DisableReadAhead, _In_ BOOLEAN DisableWriteBehind)
NTKERNELAPI VOID NTAPI CcSetBcbOwnerPointer(_In_ PVOID Bcb, _In_ PVOID OwnerPointer)
NTKERNELAPI BOOLEAN NTAPI CcCopyWrite(_In_ PFILE_OBJECT FileObject, _In_ PLARGE_INTEGER FileOffset, _In_ ULONG Length, _In_ BOOLEAN Wait, _In_reads_bytes_(Length) PVOID Buffer)
$if(_NTIFS_) extern NTKERNELAPI ULONG CcFastMdlReadWait
NTKERNELAPI LARGE_INTEGER NTAPI CcGetFlushedValidData(_In_ PSECTION_OBJECT_POINTERS SectionObjectPointer, _In_ BOOLEAN BcbListHeld)
NTKERNELAPI VOID NTAPI CcScheduleReadAhead(_In_ PFILE_OBJECT FileObject, _In_ PLARGE_INTEGER FileOffset, _In_ ULONG Length)
IN OUT PVCB IN PDEVICE_OBJECT IN PVPB Vpb
IN PVCB IN VBO IN ULONG OUT PBCB OUT PVOID IN BOOLEAN IN BOOLEAN Zero
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _Outptr_ PMDL * MdlChain
_Must_inspect_result_ _In_ PDEVICE_OBJECT _In_ PSECTION_OBJECT_POINTERS SectionObjectPointer
__in UCHAR __in POWER_STATE __in_opt PVOID __in PIO_STATUS_BLOCK IoStatus
_In_ UINT _Out_ PNDIS_HANDLE LogHandle
#define _In_reads_bytes_(s)
#define _Outptr_result_bytebuffer_(s)
#define _Out_writes_bytes_(s)
_In_ ULONG _In_ ULONG _In_ ULONG Length
BOOLEAN NTAPI CcMapData(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PVOID *BcbResult, OUT PVOID *Buffer)
$endif(_WDMDDK_) $if(_NTDDK_) typedef struct _NEON128
_In_ PNET_PNP_EVENT _In_ PTDI_PNP_CONTEXT Context1
_In_ PNET_PNP_EVENT _In_ PTDI_PNP_CONTEXT _In_ PTDI_PNP_CONTEXT Context2
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_In_ WDFDPC _In_ BOOLEAN Wait
_Must_inspect_result_ _In_ ULONG Flags
VOID(NTAPI * PCC_POST_DEFERRED_WRITE)(_In_ PVOID Context1, _In_ PVOID Context2)
VOID(NTAPI * PDIRTY_PAGE_ROUTINE)(_In_ PFILE_OBJECT FileObject, _In_ PLARGE_INTEGER FileOffset, _In_ ULONG Length, _In_ PLARGE_INTEGER OldestLsn, _In_ PLARGE_INTEGER NewestLsn, _In_ PVOID Context1, _In_ PVOID Context2)
VOID(NTAPI * PFLUSH_TO_LSN)(_In_ PVOID LogHandle, _In_ LARGE_INTEGER Lsn)
_In_ ERESOURCE_THREAD ResourceThreadId
ULONG_PTR ERESOURCE_THREAD