Partager via


FMD_WriteSector (Windows Embedded CE 6.0)

1/6/2010

This function writes the requested sector data and metadata to the flash media.

Syntax

BOOL FMD_WriteSector(
  SECTOR_ADDR startSectorAddr,
  LPBYTE pSectorBuff,
  PSectorInfo pSectorInfoBuff,
  DWORD dwNumSectors
);

Parameters

  • startSectorAddr
    [in] The starting physical sector address to write to.
  • pSectorBuff
    [in] Pointer to the buffer that contains the sector data to write. Set to NULL if no data is to be written.
  • pSectorInfoBuff
    [in] Buffer for an array of sector information structures. There must be one sector information entry for each sector that is to be written. Set to NULL if this data is not written.
  • dwNumSectors
    [in] Number of sectors to write.

Return Value

Returns TRUE on success. Returns FALSE on failure.

Remarks

In your custom implementation of FMD_WriteSector, make sure that the code first writes the sector data in pSectorBuff to the flash media, and then writes the metadata in pSectorInfoBuff to the flash media. This specific order of write operations must be implemented to ensure data integrity.

Requirements

Header fmd.h
Library Developer Implemented
Windows Embedded CE Windows CE .NET 4.2 and later

See Also

Reference

Flash Media Driver Functions

Other Resources

Flash Drivers
Flash Media Driver Reference