Complete the IRP in IRP Pending state and fill the usermode buffers with pool data.
1362{
1364 PIRP Irp;
1366
1367 UNREFERENCED_PARAMETER(Dpc);
1368 UNREFERENCED_PARAMETER(SystemArgument1);
1369 UNREFERENCED_PARAMETER(SystemArgument2);
1370
1371 NotifyRecord = DeferredContext;
1372
1373 ASSERT(NotifyRecord != NULL);
1374 _Analysis_assume_(NotifyRecord != NULL);
1375
1376 switch (NotifyRecord->
Type)
1377 {
1380
1381 if (Irp != NULL)
1382 {
1383 PCHAR OutBuff;
1385 ULONG OutBuffLength;
1386 PIO_STACK_LOCATION IrpSp;
1387
1388
1389
1390
1391 if (!(Irp->CurrentLocation <= Irp->StackCount + 1))
1392 {
1393 PlatformDbgPrint(
"Err, probably two or more functions called DPC for an object");
1394 return;
1395 }
1396
1398 InBuffLength = IrpSp->Parameters.DeviceIoControl.InputBufferLength;
1399 OutBuffLength = IrpSp->Parameters.DeviceIoControl.OutputBufferLength;
1400
1401 if (!InBuffLength || !OutBuffLength)
1402 {
1403 Irp->IoStatus.Status = STATUS_INVALID_PARAMETER;
1405 break;
1406 }
1407
1408
1409
1410
1411 if (!Irp->AssociatedIrp.SystemBuffer)
1412 {
1413
1414
1415
1416 return;
1417 }
1418
1419 OutBuff = Irp->AssociatedIrp.SystemBuffer;
1420 Length = 0;
1421
1422
1423
1424
1426 {
1427
1428
1429
1430 Irp->IoStatus.Status = STATUS_INVALID_PARAMETER;
1432 break;
1433 }
1434
1435 Irp->IoStatus.Information = Length;
1436
1437 Irp->IoStatus.Status = STATUS_SUCCESS;
1439 }
1440 break;
1441
1443
1444
1445
1447
1448
1449
1450
1452
1453 break;
1454
1455 default:
1457 break;
1458 }
1459
1460 if (NotifyRecord != NULL)
1461 {
1463 }
1464}
BOOLEAN LogReadBuffer(BOOLEAN IsVmxRoot, PVOID BufferToSaveMessage, UINT32 *ReturnedLength)
Attempt to read the buffer.
Definition Logging.c:708
struct _NOTIFY_RECORD * PNOTIFY_RECORD
union _NOTIFY_RECORD::@217351000120040342300302212137013326214173270134 Message
PIRP PendingIrp
Definition Logging.h:46
NOTIFY_TYPE Type
Definition Logging.h:41
PKEVENT Event
Definition Logging.h:45
BOOLEAN CheckVmxRootMessagePool
Definition Logging.h:50