IOCTL_DISK_PERFORMANCE - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ntdddisk.h

// CTL_CODE(0x0007, 0x008, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_DISK_PERFORMANCE 0x00070020
View the official Windows Driver Kit DDI reference
// winioctl.h

// CTL_CODE(0x0007, 0x008, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_DISK_PERFORMANCE 0x00070020
View the official Win32 API reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ni-ntdddisk-ioctl_disk_performance)

IOCTL_DISK_PERFORMANCE IOCTL

Description

Increments a reference counter that enables the collection of disk performance statistics, such as the numbers of bytes read and written since the driver last processed this request, for a corresponding disk monitoring application. In Microsoft Windows 2000 this IOCTL is handled by the filter driver diskperf. In Windows XP and later operating systems, the partition manager handles this request for disks and ftdisk.sys and dmio.sys handle this request for volumes.

Parameters

Major code

Input buffer

None.

Input buffer length

None.

Output buffer

The driver returns the DISK_PERFORMANCE data in the buffer at Irp->AssociatedIrp.SystemBuffer.

Output buffer length

Parameters.DeviceIoControl.OutputBufferLength in the I/O stack location of the IRP indicates the size, in bytes, of the buffer, which must be at least sizeof(DISK_PERFORMANCE).

Input/output buffer

Input/output buffer length

Status block

The Information field is set to sizeof(DISK_PERFORMANCE) when the Status field is set to STATUS_SUCCESS. Otherwise, the Status field can be set to STATUS_INVALID_PARAMETER or STATUS_BUFFER_TOO_SMALL.

See also

IOCTL_DISK_PERFORMANCE_OFF


Win32 API reference (ni-winioctl-ioctl_disk_performance)

IOCTL_DISK_PERFORMANCE IOCTL

Description

Enables performance counters that provide disk performance information.

To perform this operation, call the DeviceIoControl function with the following parameters.

BOOL DeviceIoControl(
  (HANDLE) hDevice,             // handle to device
  IOCTL_DISK_PERFORMANCE,       // dwIoControlCode
  NULL,                         // lpInBuffer
  0,                            // nInBufferSize
  (LPVOID) lpOutBuffer,         // output buffer
  (DWORD) nOutBufferSize,       // size of output buffer
  (LPDWORD) lpBytesReturned,    // number of bytes returned
  (LPOVERLAPPED) lpOverlapped   // OVERLAPPED structure
);

Parameters

Input buffer

Input buffer length

Output buffer

Output buffer length

Input/output buffer

Input/output buffer length

Status block

Irp->IoStatus.Status is set to STATUS_SUCCESS if the request is successful.

Otherwise, Status to the appropriate error condition as a NTSTATUS code.

For more information, see NTSTATUS Values.

Remarks

To disable the performance counters enabled by this control code, use the IOCTL_DISK_PERFORMANCE_OFF control code.

See also