23#define BugCheckFileId (CDFS_BUG_CHECK_WRITE)
38#define SafeZeroMemory(IC,AT,BYTE_COUNT) { \
40 RtlZeroMemory( (AT), (BYTE_COUNT) ); \
41__pragma(warning(suppress: 6320)) \
42 } _SEH2_EXCEPT( EXCEPTION_EXECUTE_HANDLER ) { \
43 CdRaiseStatus( IC, STATUS_INVALID_USER_BUFFER ); \
47#define SafeZeroMemory(IC,AT,BYTE_COUNT) { \
49 RtlZeroMemory( (AT), (BYTE_COUNT) ); \
50 } _SEH2_EXCEPT( EXCEPTION_EXECUTE_HANDLER ) { \
51 CdRaiseStatus( IC, STATUS_INVALID_USER_BUFFER ); \
57#pragma alloc_text(PAGE, CdCommonWrite)
102 ULONG WriteByteCount;
103 ULONG OriginalByteCount;
192 if (ByteRange >
Fcb->FileSize.QuadPart) {
195 ByteRange =
Fcb->FileSize.QuadPart;
210 (WriteByteCount > OriginalByteCount)) {
230 if (IrpContext->IoContext ==
NULL ||
240 IrpContext->IoContext = &LocalIoContext;
257 IrpContext->IoContext->AllocatedContext =
269 IrpContext->IoContext->Resource =
Fcb->Resource;
270 IrpContext->IoContext->RequestedByteCount =
ByteCount;
273 Irp->IoStatus.Information = WriteByteCount;
317 Irp->IoStatus.Information = 0;
334 }
else if (WriteByteCount !=
ByteCount) {
376 Status = CdFsdPostRequest( IrpContext,
Irp );
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
VOID CdCompleteRequest(_Inout_opt_ PIRP_CONTEXT IrpContext, _Inout_opt_ PIRP Irp, _In_ NTSTATUS Status)
#define CdMapUserBuffer(IC, UB)
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN TypeOfOpen
#define CdReleaseFile(IC, F)
_In_ PFCB _In_ LONGLONG StartingOffset
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN PFCB _In_opt_ PCCB Ccb
#define CdAllocateIoContext()
BOOLEAN CdVerifyFcbOperation(_In_opt_ PIRP_CONTEXT IrpContext, _In_ PFCB Fcb)
#define CdAcquireFileShared(IC, F)
enum _TYPE_OF_OPEN TYPE_OF_OPEN
#define CdRaiseStatus(IC, S)
#define CCB_FLAG_ALLOW_EXTENDED_DASD_IO
#define CCB_FLAG_DISMOUNT_ON_CLOSE
#define IRP_CONTEXT_FLAG_WAIT
#define IRP_CONTEXT_FLAG_ALLOC_IO
#define _Requires_lock_held_(lock)
#define _Analysis_suppress_lock_checking_(lock)
#define NT_SUCCESS(StatCode)
#define SafeZeroMemory(IC, AT, BYTE_COUNT)
_In_ PIO_STACK_LOCATION IrpSp
#define KeInitializeEvent(pEvt, foo, foo2)
#define ExGetCurrentResourceThread()
#define ClearFlag(_F, _SF)
#define BooleanFlagOn(F, SF)
#define Add2Ptr(PTR, INC)
NTSTATUS NTAPI FsRtlNormalizeNtstatus(IN NTSTATUS NtStatusToNormalize, IN NTSTATUS NormalizedNtStatus)
#define STATUS_UNEXPECTED_IO_ERROR
#define STATUS_END_OF_FILE
union _IO_STACK_LOCATION::@1579 Parameters
struct _IO_STACK_LOCATION::@3978::@3983 Write
#define RtlZeroMemory(Destination, Length)
#define STATUS_INVALID_DEVICE_REQUEST
_In_ WDFDPC _In_ BOOLEAN Wait
#define IoIsErrorUserInduced(Status)
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _In_ LARGE_INTEGER ByteCount
#define FO_SYNCHRONOUS_IO