Compartir a través de


IOCTL_STORAGE_GET_DEVICE_INTERNAL_LOG IOCTL (ntddstor.h)

Un controlador puede usar IOCTL_STORAGE_GET_DEVICE_INTERNAL_LOG para obtener los datos de estado interno del dispositivo.

Código principal

IRP_MJ_INTERNAL_DEVICE_CONTROL

Búfer de entrada

Estructura GET_DEVICE_INTERNAL_STATUS_DATA_REQUEST que identifica el tipo de datos que se van a consultar.

Longitud del búfer de entrada

Parameters.DeviceIoControl.InputBufferLength indica el tamaño, en bytes, del búfer de parámetros en Irp-AssociatedIrp.SystemBuffer>, que debe ser >= sizeof(GET_DEVICE_INTERNAL_STATUS_DATA_REQUEST).

Búfer de salida

El controlador devuelve la salida al búfer en Irp-AssociatedIrp.SystemBuffer>. Este búfer contiene una estructura de DEVICE_INTERNAL_STATUS_DATA con el estado interno del dispositivo.

Longitud del búfer de salida

Parameters.DeviceIoControl.OutputBufferLength en la ubicación de la pila de E/S indica el tamaño, en bytes, del búfer de parámetros, que debe ser >= sizeof(DEVICE_INTERNAL_STATUS_DATA)).

Búfer de entrada y salida

N/D

Longitud del búfer de entrada y salida

N/D

Bloque de estado

Irp->IoStatus.Status se establece en STATUS_SUCCESS si la solicitud se realiza correctamente. De lo contrario, Status se establece en la condición de error adecuada como código NTSTATUS. Para obtener más información, vea Valores NTSTATUS.

Comentarios

IOCTL_STORAGE_GET_DEVICE_INTERNAL_LOG devuelve el registro de telemetría del dispositivo iniciado por el host desde cualquier dispositivo de almacenamiento. El pseudocódigo siguiente muestra cómo solicitar el encabezado de datos de telemetría:

// Allocate a GET_DEVICE_INTERNAL_STATUS_DATA_REQUEST structure, then
// initialize it with a data header request:
//   request.Version = sizeof(GET_DEVICE_INTERNAL_STATUS_DATA_REQUEST);
//   request.Size = sizeof(GET_DEVICE_INTERNAL_STATUS_DATA_REQUEST);
//   request.RequestDataType = DeviceCurrentInternalStatusDataHeader;

// Allocate a DEVICE_INTERNAL_STATUS_DATA structure in which
// to return the header data, with outputBufferLength set to
// (sizeof(DEVICE_INTERNAL_STATUS_DATA) + 512).

// Get the device internal status data.
BOOL result = TRUE;
ULONG returnedLength = 0;
result = DeviceIoControl(deviceHandle,
            IOCTL_STORAGE_GET_DEVICE_INTERNAL_LOG,
            &request,
            sizeof(GET_DEVICE_INTERNAL_STATUS_DATA_REQUEST),
            &outputBuffer,
            outputBufferLength,
            &returnedLength,
            NULL);

Requisitos

Requisito Value
Cliente mínimo compatible Windows 10, versión 2004
Encabezado ntddstor.h

Consulte también

DEVICE_INTERNAL_STATUS_DATA

GET_DEVICE_INTERNAL_STATUS_DATA_REQUEST