IOCTL_FLASH_GET_PARTITION_TABLE (Compact 2013)
3/26/2014
This I/O control message retrieves the entire partition table across all flash regions. The partition table is returned as an array of FLASH_PARTITION_INFO structures, with the number of elements equal to the number of partitions on the flash storage media. Send this message with DeviceIoControl.
Syntax
BOOL DeviceIoControl(
HANDLE hDevice, // handle to the device
DWORD dwIoControlCode, // use IOCTL_FLASH_GET_PARTITION_TABLE
LPVOID lpInBuffer, // pointer to input buffer
DWORD nInBufferSize, // input buffer size
LPVOID lpOutBuffer, // pointer to output buffer
DWORD nOutBufferSize, // output buffer size
LPDWORD lpBytesReturned, // number of bytes returned
OVERLAPPED lpOverlapped, // pointer to OVERLAPPED structure
);
Parameters
- hDevice
[in] Handle to the device.
- dwIoControlCode
[in] The control code for the operation. Use IOCTL_FLASH_GET_PARTITION_TABLE for this operation.
- lpInBuffer
Not used; set to NULL.
- nInBufferSize
Not used; set to zero.
- lpOutBuffer
[out] Receives the partition table. Pass NULL to query the size of the partition table.
- nOutBufferSize
[in] Size, in bytes, of the partition table buffer passed in.
- lpBytesReturned
[out] Size, in bytes, of the partition table. Used to query the size of the partition table prior to calling again with the actual buffer for the table.
Return Values
Returns nonzero if successful; otherwise, returns zero.
Remarks
To get extended error information, call GetLastError. GetLastError may return other standard error messages as appropriate.
Requirements
Header |
FlashMdd.h |