// ntddstor.h
BOOLEAN DeviceDsmValidateOutput(
PDEVICE_DSM_DEFINITION Definition,
PDEVICE_DSM_OUTPUT Output,
ULONG OutputLength
);
View the official Windows Driver Kit DDI referenceNo description available.
The DeviceDsmValidateOutput function validates the output for a data set management (DSM) operation.
DefinitionPointer to a DEVICE_DSM_DEFINITION structure that defines the operation.
OutputPointer to the DEVICE_DSM_OUTPUT structure of the operation.
OutputLengthThe length, in bytes, of the entire output buffer.
Returns TRUE if the output is valid, or FALSE otherwise.
The output is returned in the payload of an IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES request. Before extracting the output, the caller should first call DeviceDsmValidateOutput to ensure that the output is valid based on the operation's Definition and Output (whose Action members must match), including the DEVICE_DSM_OUTPUT structure that Output points to, and the output block, if any, that follows the DEVICE_DSM_OUTPUT structure.
See Data Set Management Overview for more details on handling a DSM.