38 if (
Irp->AssociatedIrp.SystemBuffer)
97 FinalStatus = KernelIosb->Status;
151 NormalRoutine =
NULL;
152 NormalContext =
NULL;
291 if ((
FileObject->CompletionContext) && (UserApcRoutine))
322 (
PVOID*)&EventObject,
348 LockedForSynch =
TRUE;
433 CompletionInfo = *(
FileObject->CompletionContext);
450 if (CompletionInfo.
Port !=
NULL && UserApcContext !=
NULL)
479 Irp->UserEvent = EventObject;
480 Irp->Overlay.AsynchronousParameters.UserApcRoutine = UserApcRoutine;
481 Irp->Overlay.AsynchronousParameters.UserApcContext = UserApcContext;
487 Irp->AssociatedIrp.SystemBuffer =
NULL;
489 Irp->Tail.Overlay.AuxiliaryBuffer =
NULL;
507 StackPtr->
Parameters.DeviceIoControl.OutputBufferLength =
529 Irp->AssociatedIrp.SystemBuffer =
576 Irp->AssociatedIrp.SystemBuffer =
599 if (!
Irp->MdlAddress)
699 Irp->Overlay.AsynchronousParameters.UserApcRoutine =
NULL;
808 Irp->Overlay.AsynchronousParameters.UserApcRoutine =
NULL;
810 Irp->AssociatedIrp.SystemBuffer =
Buffer;
818 Stack->Parameters.QueryFile.FileInformationClass = FileInfoClass;
900 FileName.Buffer = RenameInfo->FileName;
901 FileName.Length = RenameInfo->FileNameLength;
902 FileName.MaximumLength = RenameInfo->FileNameLength;
907 RenameInfo->RootDirectory,
919 FileObjectExtension =
FileObject->FileObjectExtension;
964 !RenameInfo->ReplaceIfExists &&
978 (
PVOID *)&TargetFileObject,
996 Stack->Parameters.SetFile.FileObject = TargetFileObject;
1066 while (StackDO !=
NULL)
1075 StackDO = StackDO->AttachedDevice;
1100 DriverName.
Length = DriverPathInfo->DriverNameLength;
1101 DriverName.
MaximumLength = DriverPathInfo->DriverNameLength;
1102 DriverName.
Buffer = &DriverPathInfo->DriverName[0];
1179 Irp->UserIosb = StatusBlock;
1249 Irp->UserIosb = StatusBlock;
1359 Irp->Overlay.AsynchronousParameters.UserApcRoutine =
NULL;
1585 Irp->Overlay.AsynchronousParameters.UserApcRoutine =
NULL;
1715 LockedForSync =
TRUE;
1735 Irp->Overlay.AsynchronousParameters.UserApcRoutine =
ApcRoutine;
1736 Irp->Overlay.AsynchronousParameters.UserApcContext =
ApcContext;
1842 CapturedLength = *
Length;
1869 &CapturedByteOffset,
1914 return KernelIosb.
Status;
1929 LockedForSync =
TRUE;
1946 Irp->Overlay.AsynchronousParameters.UserApcRoutine =
ApcRoutine;
1947 Irp->Overlay.AsynchronousParameters.UserApcContext =
ApcContext;
1967 *LocalLength = CapturedLength;
1968 Irp->Tail.Overlay.AuxiliaryBuffer = (
PVOID)LocalLength;
1969 StackPtr->
Parameters.LockControl.Length = LocalLength;
1972 StackPtr->
Parameters.LockControl.ByteOffset = CapturedByteOffset;
2038 if (CapturedFileName.
Length)
2048 CapturedFileName.
Length +
2054 CapturedFileName.
Length);
2077#define CHECK_LENGTH(class, struct) \
2079 if (Length < sizeof(struct)) \
2080 return STATUS_INFO_LENGTH_MISMATCH; \
2151 LockedForSynch =
TRUE;
2170 Irp->Overlay.AsynchronousParameters.UserApcRoutine =
ApcRoutine;
2171 Irp->Overlay.AsynchronousParameters.UserApcContext =
ApcContext;
2173 Irp->Tail.Overlay.AuxiliaryBuffer = AuxBuffer;
2174 Irp->AssociatedIrp.SystemBuffer =
NULL;
2183 if (!
Irp->AssociatedIrp.SystemBuffer)
2229 StackPtr->
Parameters.QueryDirectory.FileInformationClass =
2231 StackPtr->
Parameters.QueryDirectory.FileName = AuxBuffer;
2232 StackPtr->
Parameters.QueryDirectory.FileIndex = 0;
2234 StackPtr->
Flags = 0;
2291 PVOID NormalContext;
2400 CurrentByteOffset =
FileObject->CurrentByteOffset;
2483 return KernelIosb.
Status;
2498 Irp->Overlay.AsynchronousParameters.UserApcRoutine =
NULL;
2502 Irp->AssociatedIrp.SystemBuffer =
NULL;
2515 Irp->AssociatedIrp.SystemBuffer =
2548 AccessBuffer =
Irp->AssociatedIrp.SystemBuffer;
2555 ModeBuffer =
Irp->AssociatedIrp.SystemBuffer;
2562 AlignmentBuffer =
Irp->AssociatedIrp.SystemBuffer;
2569 AllBuffer =
Irp->AssociatedIrp.SystemBuffer;
2661 NormalRoutine =
NULL;
2662 NormalContext =
NULL;
2721 ULONG CapturedKey = 0;
2824 if (
Key) CapturedKey = *
Key;
2828 if ((CapturedByteOffset.
QuadPart < 0) && (CapturedByteOffset.
QuadPart != -2))
2843 (
PVOID*)&EventObject,
2871 (CapturedByteOffset.
u.HighPart == -1)))
2874 CapturedByteOffset =
FileObject->CurrentByteOffset;
2885 &CapturedByteOffset,
2930 return KernelIosb.
Status;
2957 Irp->Overlay.AsynchronousParameters.UserApcRoutine =
ApcRoutine;
2958 Irp->Overlay.AsynchronousParameters.UserApcContext =
ApcContext;
2960 Irp->UserEvent = EventObject;
2964 Irp->AssociatedIrp.SystemBuffer =
NULL;
2973 StackPtr->
Parameters.Read.ByteOffset = CapturedByteOffset;
2985 Irp->AssociatedIrp.SystemBuffer =
3111 PVOID NormalContext;
3271 Irp->Overlay.AsynchronousParameters.UserApcRoutine =
NULL;
3275 Irp->AssociatedIrp.SystemBuffer =
NULL;
3288 Irp->AssociatedIrp.SystemBuffer =
3335 CompletionInfo =
Irp->AssociatedIrp.SystemBuffer;
3378 Irp->IoStatus.Information = 0;
3385 RenameInfo =
Irp->AssociatedIrp.SystemBuffer;
3511 NormalRoutine =
NULL;
3512 NormalContext =
NULL;
3619 CapturedLength = *
Length;
3637 &CapturedByteOffset,
3657 return KernelIosb.
Status;
3699 Irp->Overlay.AsynchronousParameters.UserApcRoutine =
NULL;
3716 *LocalLength = CapturedLength;
3717 Irp->Tail.Overlay.AuxiliaryBuffer = (
PVOID)LocalLength;
3718 StackPtr->
Parameters.LockControl.Length = LocalLength;
3732 StackPtr->
Parameters.LockControl.ByteOffset = CapturedByteOffset;
3783 ULONG CapturedKey = 0;
3891 if (
Key) CapturedKey = *
Key;
3895 if (CapturedByteOffset.
QuadPart < -2)
3909 CapturedByteOffset.
u.HighPart = -1;
3920 (
PVOID*)&EventObject,
3948 (CapturedByteOffset.
u.HighPart == -1)))
3951 CapturedByteOffset =
FileObject->CurrentByteOffset;
3962 &CapturedByteOffset,
4005 return KernelIosb.
Status;
4032 Irp->Overlay.AsynchronousParameters.UserApcRoutine =
ApcRoutine;
4033 Irp->Overlay.AsynchronousParameters.UserApcContext =
ApcContext;
4035 Irp->UserEvent = EventObject;
4039 Irp->AssociatedIrp.SystemBuffer =
NULL;
4048 StackPtr->
Parameters.Write.Key = CapturedKey;
4050 StackPtr->
Parameters.Write.ByteOffset = CapturedByteOffset;
4062 Irp->AssociatedIrp.SystemBuffer =