// ntddchgr.h
// CTL_CODE(0x0030, 0x005, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_CHANGER_GET_ELEMENT_STATUS 0x0030C014
View the official Windows Driver Kit DDI reference// winioctl.h
// CTL_CODE(0x0030, 0x005, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_CHANGER_GET_ELEMENT_STATUS 0x0030C014
View the official Win32 API referenceNo description available.
Returns the status of all elements or the status of a specified number of elements of a particular type.
For a description of the possible element types, see CHANGER_ELEMENT.
The buffer at Irp->AssociatedIrp.SystemBuffer contains the CHANGER_READ_ELEMENT_STATUS data that indicates the element type and the number of elements for which to return status.
If the caller sets the VolumeTagInfo member of CHANGER_READ_ELEMENT_STATUS to TRUE, the element status that is returned will include volume tag information.
Parameters.DeviceIoControl.InputBufferLength in the I/O stack location indicates the size, in bytes, of the parameter buffer for input, which must be >= sizeof(CHANGER_READ_ELEMENT_STATUS).
The changer miniclass driver returns the changer element status data in the buffer at Irp->AssociatedIrp.SystemBuffer. Some elements of type ChangerDrive return product information data. If the device provides product information, the miniclass driver will report the element status data in a structure of type CHANGER_ELEMENT_STATUS_EX. The miniclass driver sets ELEMENT_STATUS_PRODUCT_DATA in the Flags member of the structure to indicate that it contains product information data. For elements of all types other than ChangerDrive, the driver reports element status data in a structure of type CHANGER_ELEMENT_STATUS.
Parameters.DeviceIoControl.OutputBufferLength indicates the size, in bytes, of the parameter buffer for output. For elements of type ChangerDrive, this value must be >= NumberOfElements * sizeof(CHANGER_ELEMENT_STATUS_EX). For elements of all other types, this value must be >= NumberOfElements * sizeof(CHANGER_ELEMENT_STATUS).
The Information field is set to the number of bytes returned. The Status field is set to STATUS_SUCCESS, or possibly to STATUS_BUFFER_TOO_SMALL, STATUS_INFO_LENGTH_MISMATCH, STATUS_INSUFFICIENT_RESOURCES, STATUS_INVALID_ELEMENT_ADDRESS, or STATUS_INVALID_PARAMETER.
Retrieves the status of all elements or a specified number of elements of a particular type.
To perform this operation, call the DeviceIoControl function with the following parameters.
BOOL DeviceIoControl(
(HANDLE) hDevice, // handle to device
IOCTL_CHANGER_GET_ELEMENT_STATUS, // dwIoControlCode
(LPVOID) lpInBuffer, // input buffer
(DWORD) nInBufferSize, // size of input buffer
(LPVOID) lpOutBuffer, // output buffer
(DWORD) nOutBufferSize, // size of output buffer
(LPDWORD) lpBytesReturned, // number of bytes returned
(LPOVERLAPPED) lpOverlapped // OVERLAPPED structure
);
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.