NT_DISK::Control

int __fastcall NT_DISK::Control(
        NT_DISK *this,
        ULONG a2,
        void *a3,
        ULONG a4,
        void *OutputBuffer,
        unsigned int OutputBufferLength){
  IRP *v10; 
  int result; 
  struct _IO_STATUS_BLOCK IoStatusBlock; 
  struct _KEVENT Event; 
  memset(&Event, 0, sizeof(Event));
  IoStatusBlock = 0i64;
  KeInitializeEvent(&Event, NotificationEvent, 0);
  v10 = IoBuildDeviceIoControlRequest(
          a2,
          *((PDEVICE_OBJECT *)this + 44),
          a3,
          a4,
          OutputBuffer,
          OutputBufferLength,
          0,
          &Event,
          &IoStatusBlock);
  if( !v10 )
    return -1073741670;
  result = IofCallDriver(*((PDEVICE_OBJECT *)this + 44), v10);
  if( result == 259 )
  {
    KeWaitForSingleObject(&Event, Executive, 0, 0, 0i64);
    return IoStatusBlock.Status;
  }
  return result;
}

Referenced by:

No references.