// ntddstor.h
typedef struct _STORAGE_HOTPLUG_INFO {
ULONG Size;
BOOLEAN MediaRemovable;
BOOLEAN MediaHotplug;
BOOLEAN DeviceHotplug;
BOOLEAN WriteCacheEnableOverride;
} STORAGE_HOTPLUG_INFO, *PSTORAGE_HOTPLUG_INFO;
View the official Windows Driver Kit DDI reference// winioctl.h
typedef struct _STORAGE_HOTPLUG_INFO {
DWORD Size;
BOOLEAN MediaRemovable;
BOOLEAN MediaHotplug;
BOOLEAN DeviceHotplug;
BOOLEAN WriteCacheEnableOverride;
} STORAGE_HOTPLUG_INFO, *PSTORAGE_HOTPLUG_INFO;
View the official Win32 API referenceNo description available.
The STORAGE_HOTPLUG_INFO structure provides hotplug information for a device.
SizeIndicates the size, in bytes, of this structure.
MediaRemovableSpecifies whether the media is removable. If set to a nonzero value, the device media is removable. If set to zero, the device media is not removable.
MediaHotplugSpecifies whether the media is lockable. If set to a nonzero value, the device media is not lockable. If set to zero, the device media is lockable.
DeviceHotplugSpecifies whether the device is a hotplug device. If set to a nonzero value, the device is a hotplug device. If set to zero, the device is not a hotplug device.
WriteCacheEnableOverrideDo not use; set the value to NULL.
The value of the Size member also identifies the version of this structure. New members will be added to this structure in the future. If the value of the Size member is sizeof(STORAGE_HOTPLUG_INFO), the current version of the structure is the same as the version you compiled with. If the value is not sizeof(STORAGE_HOTPLUG_INFO), the current version contains additional members.
Microsoft Windows XP includes support for hotplug devices. A hotplug device refers to a device whose RemovalPolicy value displayed in the Device Manager is ExpectSurpriseRemoval. To query whether a particular device is a hotplug device, use the IOCTL_STORAGE_GET_HOTPLUG_INFO request. To set the hotplug properties of a device, use the IOCTL_STORAGE_SET_HOTPLUG_INFO request.
In the case of the IOCTL_STORAGE_SET_HOTPLUG_INFO request, 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 may be selectively enabled.
IOCTL_STORAGE_GET_HOTPLUG_INFO
IOCTL_STORAGE_SET_HOTPLUG_INFO
Provides information about the hotplug information of a device.
SizeThe size of this structure, in bytes. The caller must set this member to
sizeof(STORAGE_HOTPLUG_INFO).
MediaRemovableIf this member is set to a nonzero value, the device media is removable. Otherwise, the device media is not removable.
MediaHotplugIf this member is set to a nonzero value, the media is not lockable. Otherwise, the device media is lockable.
DeviceHotplugIf this member is set to a nonzero value, the device is a hotplug device. Otherwise, the device is not a hotplug device.
WriteCacheEnableOverrideReserved; set the value to NULL.
The value of the Size member also identifies the version of this structure, as
members will be added to this structure in the future. If the value of the Size member
is sizeof(STORAGE_HOTPLUG_INFO), the current version of the
structure is the same as the version you compiled with. If the value is not
sizeof(STORAGE_HOTPLUG_INFO), then the current version contains
additional members.
A hotplug device refers to a device whose RemovalPolicy value displayed in the Device Manager is ExpectSurpriseRemoval. To query whether a particular device is a hotplug device, use the IOCTL_STORAGE_GET_HOTPLUG_INFO operation. To set the hotplug properties of a device, use the IOCTL_STORAGE_SET_HOTPLUG_INFO operation.
The IOCTL_STORAGE_SET_HOTPLUG_INFO operation only sets the value of the DeviceHotplug member of this structure. If the value of that member is set, the removal policy of the specified device is set to ExpectSurpriseRemoval and all levels of caching are disabled. If the value of that member is not set, the removal policy of the specified device is set to ExpectOrderlyRemoval, and caching may be selectively enabled.
IOCTL_STORAGE_GET_HOTPLUG_INFO
IOCTL_STORAGE_SET_HOTPLUG_INFO