IOCTL_STORAGE_LOAD_MEDIA - NtDoc

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

// CTL_CODE(0x002d, 0x203, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_STORAGE_LOAD_MEDIA 0x002D480C
View the official Windows Driver Kit DDI reference
// winioctl.h

// CTL_CODE(0x002d, 0x203, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_STORAGE_LOAD_MEDIA 0x002D480C
View the official Win32 API reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ni-ntddstor-ioctl_storage_load_media)

IOCTL_STORAGE_LOAD_MEDIA IOCTL

Description

Causes media to be loaded in a device that the caller has opened for read or write access. If read or write access to the device is not necessary, the caller can improve performance by opening the device with FILE_READ_ATTRIBUTES and issuing an IOCTL_STORAGE_LOAD_MEDIA2 request instead.

Parameters

Major code

Input buffer

None.

Input buffer length

None.

Output buffer

None.

Output buffer length

None.

Input/output buffer

Input/output buffer length

Status block

The Information field is set to zero. The Status field is set to STATUS_SUCCESS, or possibly to STATUS_INVALID_DEVICE_REQUEST, STATUS_NO_MEDIA_IN_DEVICE, STATUS_BUFFER_TOO_SMALL, or STATUS_DEVICE_NOT_CONNECTED.

See also

IOCTL_STORAGE_LOAD_MEDIA2


Win32 API reference (ni-winioctl-ioctl_storage_load_media)

IOCTL_STORAGE_LOAD_MEDIA IOCTL

Description

Loads media into a device.

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

BOOL DeviceIoControl(
  (HANDLE) hDevice,             // handle to device
  IOCTL_STORAGE_LOAD_MEDIA,     // dwIoControlCode
  NULL,                         // lpInBuffer
  0,                            // nInBufferSize
  NULL,                         // lpOutBuffer
  0,                            // nOutBufferSize
  (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

The IOCTL_STORAGE_LOAD_MEDIA control code is valid only for devices that support loadable media.

See also