// sffdisk.h
typedef struct _SFFDISK_DEVICE_COMMAND_DATA {
USHORT HeaderSize;
USHORT Flags;
SFFDISK_DCMD Command;
USHORT ProtocolArgumentSize;
ULONG DeviceDataBufferSize;
ULONG_PTR Information;
UCHAR Data[0];
} SFFDISK_DEVICE_COMMAND_DATA, *PSFFDISK_DEVICE_COMMAND_DATA;
View the official Windows Driver Kit DDI referenceNo description available.
The SFFDISK_DEVICE_COMMAND_DATA structure specifies the operation performed by an IOCTL_SFFDISK_DEVICE_COMMAND request.
HeaderSizeThe length, in bytes, of the header structure. The size does not include any data concatenated at the end. The caller should initialize this field to sizeof (SFFDISK_DEVICE_COMMAND_DATA).
FlagsReserved.
CommandContains an enumeration value of type SFFDISK_DCMD that defines the type of operation. Typical operations include retrieval of the card's security level, device commands, and locking (or unlocking) the interface channel as a preliminary action to a series of commands.
ProtocolArgumentSizeThe length in bytes of the device command arguments that immediately follow this header structure. This data begins at the address indicated by the Data member. Device command arguments are specific to the protocol of the device.
DeviceDataBufferSizeDefines the length, in bytes, of the data transfer.
InformationOn output, this member contains an operation-dependent status value.
Data[0]Buffer that contains the command arguments.
The following diagram indicates the layout of the data submitted with an IOCTL_SFFDISK_DEVICE_COMMAND request. The caller of this request stores this data at the location indicated by the Data member of the SFFDISK_DEVICE_COMMAND_DATA structure:

The format of the protocol arguments depends on the protocol that the device uses. For an SD storage device, the protocol arguments section will contain an SDCMD_DESCRIPTOR.