IopAllocateIrpMustSucceed

_IRP *__stdcall IopAllocateIrpMustSucceed(_DEVICE_OBJECT *DeviceObject, INT8 StackSize){
  _IRP *result; 
  CHAR v5; 
  VOID *retaddr; 

  for( result = IopAllocateIrpExReturn(DeviceObject, StackSize, 0, retaddr);
        !result;
        result = IopAllocateIrpExReturn(DeviceObject, StackSize, 0, retaddr) )
  {
    result = IopAllocateReserveIrp(v5, (_IOP_RESERVE_IRP_TYPE)(unsigned __int8)StackSize, IopMustSucceedIrp);
    if( result )
      break;
  }
  result->AllocationFlags |= 0x20u;
  return result;
}

Referenced by:

IoCancelFileOpen
IopCloseFile
IopDeleteFile
IopFreeBandwidthContract