IOCTL_STORAGE_GET_DEVICE_INTERNAL_LOG IOCTL (ntddstor.h)

Un driver può usare IOCTL_STORAGE_GET_DEVICE_INTERNAL_LOG per ottenere i dati di stato interni dal dispositivo.

Codice principale

IRP_MJ_INTERNAL_DEVICE_CONTROL

Buffer di input

Struttura GET_DEVICE_INTERNAL_STATUS_DATA_REQUEST che identifica il tipo di dati da eseguire su query.

Lunghezza del buffer di input

Parameters.DeviceIoControl.InputBufferLength indica le dimensioni, in byte, del buffer dei parametri in Irp-AssociatedIrp.SystemBuffer>, che deve essere >= sizeof(GET_DEVICE_INTERNAL_STATUS_DATA_REQUEST).

Buffer di output

Il driver restituisce l'output al buffer in Irp-AssociatedIrp.SystemBuffer>. Questo buffer contiene una struttura DEVICE_INTERNAL_STATUS_DATA con lo stato interno del dispositivo.

Lunghezza del buffer di output

Parameters.DeviceIoControl.OutputBufferLength nella posizione dello stack I/O indica le dimensioni, in byte, del buffer dei parametri, che deve essere >= sizeof(DEVICE_INTERNAL_STATUS_DATA).

Input/Buffer di output

n/d

Lunghezza del buffer di input/output

n/d

Blocco dello stato

Irp->IoStatus.Status è impostato su STATUS_SUCCESS se la richiesta ha esito positivo. In caso contrario, lo stato è impostato sulla condizione di errore appropriata come codice NTSTATUS. Per altre informazioni, vedere Valori NTSTATUS.

Commenti

IOCTL_STORAGE_GET_DEVICE_INTERNAL_LOG restituisce il log di telemetria del dispositivo avviato dall'host da qualsiasi dispositivo di archiviazione. Lo pseudocode seguente illustra come richiedere l'intestazione dei dati di telemetria:

// 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);

Requisiti

Requisito Valore
Client minimo supportato Windows 10, versione 2004
Intestazione ntddstor.h

Vedi anche

DEVICE_INTERNAL_STATUS_DATA

GET_DEVICE_INTERNAL_STATUS_DATA_REQUEST