IOCTL_STORAGE_SET_HOTPLUG_INFO control code
Sets the hotplug configuration of the specified device. This request takes a STORAGE_HOTPLUG_INFO structure as input. The DeviceHotplug member of the STORAGE_HOTPLUG_INFO structure determines what action is taken. If the value of that member is nonzero, the value for the device's removal policy in the registry is set to ExpectSurpriseRemoval and all levels of caching are disabled. If the value of DeviceHotplug is zero, the removal policy is set to ExpectOrderlyRemoval, and caching might be selectively enabled.
Parameters.DeviceIoControl.InputBufferLength in the I/O stack location indicates the size, in bytes, of the parameter buffer, which must be greater than or equal to sizeof(STORAGE_HOTPLUG_INFO).
The driver returns the hotplug configuration data in a STORAGE_HOTPLUG_INFO structure in the buffer at Irp->AssociatedIrp.SystemBuffer.
The Status field is set to STATUS_SUCCESS, or possibly to STATUS_INFO_LENGTH_MISMATCH if the input buffer is too small. It is set to STATUS_INVALID_PARAMETER_1 if the Size member of STORAGE_HOTPLUG_INFO is not the size expected by the class driver for this device. It is set to STATUS_INVALID_PARAMETER_2 if the MediaRemoveable member has a value different from that held by the class driver. It is set to STATUS_INVALID_PARAMETER_3 if the MediaHotplug member has a value different from that held by the class driver, and it is set to STATUS_INVALID_PARAMETER_5 if the WriteCacheEnableOverride member has a value different from that held by the class driver.
Build date: 11/16/2013