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