IOCTL_DISK_GET_STORAGEID (Windows CE 5.0)
[in] Handle to the block device storage volume, which can be obtained by opening the FAT volume by its file system entry. The following code example shows how to open a PC Card storage volume.
hVolume = CreateFile(TEXT("\Storage Card\Vol:"), GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
[in] Specifies this IOCTL.
[in] Set to NULL.
[in] Set to zero.
[out] Set to the address of an allocated STORAGE_IDENTIFICATION structure. This buffer receives the storage identifier data when the IoControl call returns.
[out] Set to the size of the STORAGE_IDENTIFICATION structure and also additional memory for the identifiers. For Advanced Technology Attachment (ATA) disk devices, the identifiers consist of 20 bytes for a manufacturer identifier string, and also 10 bytes for the serial number of the disk.
[out] Pointer that receives the number of bytes that lpOutBuf receives.
If you provide support in a block device driver for IOCTL_DISK_GET_STORAGEID, then the driver should return TRUE on a successful operation, and return FALSE if this is a non-supported code. If FALSE returns, callers should call GetLastError for information. An error of ERROR_INSUFFICIENT_BUFFER indicates that lpOutBuf is too small to store the information.
This IOCTL is required to implement Digital Rights Management.
Block device drivers, such as the sample ATADISK driver, implement this code. For more information, see Sample ATADISK Driver.
The caller must allocate enough memory for the structure and the identifiers. If the buffer is not large enough to hold the data, the call will fail and dwSize will receive the size of the required buffer. Whether a block device driver supports this code depends on the implementation and whether the hardware contains storage identifier information.
You do not need to store the manufacturer identifier string and disk serial number. For ATA disk devices, the manufacturer identifier string and disk serial number read directly from the storage card.
OS Versions: Windows CE 3.0 and later.
Send Feedback on this topic to the authors