|
|
1.1.1.2 ! root 1: /* Copyright (C) 2004 TrueCrypt Foundation 1.1 root 2: This product uses components written by Paul Le Roux <[email protected]> */ 3: 4: #include "TCdefs.h" 5: #include "crypto.h" 6: #include "fat.h" 7: #include "volumes.h" 8: 9: #include "apidrvr.h" 10: #include "ntdriver.h" 11: #include "ntvol.h" 12: #include "ntrawdv.h" 13: 14: #pragma warning( disable : 4127 ) 15: 16: NTSTATUS 17: TCSendIRP_RawDevice (PDEVICE_OBJECT DeviceObject, 18: PEXTENSION Extension, 19: PVOID pUserBuffer, 20: ULONG uFlags, 21: UCHAR uMajorFunction, 22: PIRP Irp) 23: { 24: PIO_STACK_LOCATION irpSp; 25: PIO_STACK_LOCATION irpNextSp; 26: NTSTATUS ntStatus; 27: 28: if (uFlags); /* Remove compiler warning */ 29: 30: // Dump ("Sending IRP...\n"); 31: 32: irpSp = IoGetCurrentIrpStackLocation (Irp); 33: irpNextSp = IoGetNextIrpStackLocation (Irp); 34: 35: irpSp->MajorFunction = uMajorFunction; 36: irpSp->DeviceObject = DeviceObject; 37: irpSp->FileObject = Extension->pfoDeviceFile; 38: 39: /* Copy our flags down one level, this is to get the proper 40: removable-media handling */ 41: irpNextSp->Flags = irpSp->Flags; 42: 43: /* Setup the lower drivers stack location */ 44: irpNextSp->MajorFunction = irpSp->MajorFunction; 45: irpNextSp->MinorFunction = irpSp->MinorFunction; 46: irpNextSp->DeviceObject = irpSp->DeviceObject; 47: irpNextSp->FileObject = irpSp->FileObject; 48: /* Copy over io parameters, this is a union, so it handles 49: deviceiocontrol & read/write */ 50: irpNextSp->Parameters.Read.Length = irpSp->Parameters.Read.Length; 51: irpNextSp->Parameters.Read.ByteOffset = irpSp->Parameters.Read.ByteOffset; 52: irpNextSp->Parameters.Read.Key = irpSp->Parameters.Read.Key; 53: 54: IoSetCompletionRoutine (Irp, TCCompletion, pUserBuffer, TRUE, TRUE, TRUE); 55: ntStatus = IoCallDriver (Extension->pFsdDevice, Irp); 56: 57: // Dump ("IRP Sent!\n"); 58: return ntStatus; 59: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.