STORAGE_HOTPLUG_INFO - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// 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 reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ns-ntddstor-_storage_hotplug_info)

_STORAGE_HOTPLUG_INFO structure

Description

The STORAGE_HOTPLUG_INFO structure provides hotplug information for a device.

Members

Size

Indicates the size, in bytes, of this structure.

MediaRemovable

Specifies 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.

MediaHotplug

Specifies 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.

DeviceHotplug

Specifies 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.

WriteCacheEnableOverride

Do not use; set the value to NULL.

Remarks

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.

See also

IOCTL_STORAGE_GET_HOTPLUG_INFO

IOCTL_STORAGE_SET_HOTPLUG_INFO


Win32 API reference (ns-winioctl-storage_hotplug_info)

STORAGE_HOTPLUG_INFO structure

Description

Provides information about the hotplug information of a device.

Members

Size

The size of this structure, in bytes. The caller must set this member to sizeof(STORAGE_HOTPLUG_INFO).

MediaRemovable

If this member is set to a nonzero value, the device media is removable. Otherwise, the device media is not removable.

MediaHotplug

If this member is set to a nonzero value, the media is not lockable. Otherwise, the device media is lockable.

DeviceHotplug

If this member is set to a nonzero value, the device is a hotplug device. Otherwise, the device is not a hotplug device.

WriteCacheEnableOverride

Reserved; set the value to NULL.

Remarks

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.

See also

IOCTL_STORAGE_GET_HOTPLUG_INFO

IOCTL_STORAGE_SET_HOTPLUG_INFO