Share via


IOCTL_FLASH_LOCK_PARTITIONS (Compact 2013)

3/26/2014

This I/O control message locks one or more partitions, such that blocks can not be unlocked without a power reset. All other partitions on store will be unlocked. This I/O control message allows for regions that are not contiguous to be locked, but the flash part may not support this behavior. Send this message with DeviceIoControl.

Syntax

BOOL DeviceIoControl(
    HANDLE hDevice,           // handle to the device
    DWORD dwIoControlCode,    // use IOCTL_FLASH_LOCK_PARTITIONS
    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_LOCK_PARTITIONS for this operation.
  • lpInBuffer
    [in] Pointer to an array of PARTITION_ID structures. Each element of the array specifies a partition identifier to lock.
  • nInBufferSize
    [in] Size of the PARTITION_ID structure multiplied by the number of elements in the array.
  • lpOutBuffer
    [in] Not used; set to NULL.
  • nOutBufferSize
    [out] Not used; set to zero.
  • lpBytesReturned
    [in] Not used; set to NULL.

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

See Also

Reference

Flash Driver MDD IOCTLs