Compartilhar via


MAPHEADER (Compact 2013)

3/28/2014

This structures stores header information on a shared memory buffer.

Syntax

typedef struct _MAPHEADER {
    //
    // VERSION 1 DATA
    DWORD  dwBufSize;
    LPBYTE pWrite;
    LPBYTE pRead;
    BOOL   fSetEvent;
    BYTE   bReserved;
    DWORD  dwLostBytes;
    //
    // VERSION 2 DATA
    DWORD  dwVersion;
    DWORD  dwBufferStart;
    DWORD  dwWriteOffset;
    DWORD  dwReadOffset;
    //
    // VERSION 3 DATA
    DWORD Signature;
    BOOL IsLocked;
    DWORD dwSyncBufferStart;
    DWORD dwSyncBufferSize;
    DWORD dwSyncWriteOffset;
    DWORD dwSyncReadOffset;
    DWORD dwIntBufferStart;
    DWORD dwIntBufferSize;
    DWORD dwIntWriteOffset;
    DWORD dwIntReadOffset;

} MAPHEADER, *PMAPHEADER;

Members

  • dwBufSize
    Size of the data buffer. This does not include the size of the header.
  • pWrite
    Pointer to the next location to be written in the buffer.

    Valid for Version 1 of this structure. This pointer is NULL for version 2 and 3 of this structure.

  • pRead
    Pointer to the next location to read from.

    Valid for Version 1 of this structure. This pointer is NULL for version 2 and 3 of this structure.

  • fSetEvent
    Flag that indicates whether the fill event can be set.

    The writer sets this value to FALSE. The reader sets this value to TRUE.

  • bReserved
    Unused padding for DWORD alignment.
  • dwLostBytes
    Total number of lost bytes.

    This value is set by the writer and only read by the reader.

  • dwVersion
    Indicates the version of this structure.

    This value is 2 for Windows Embedded CE 6.0 and 3 for Windows Embedded Compact 2013.

  • dwBufferStart
    Offset of buffer start from the beginning of the map.

    Valid for version 2 and 3 of this structure.

  • dwWriteOffset
    Offset of write pointer from the beginning of the map. The writer moves this pointer.

    Valid for version 2 and 3 of this structure.

  • dwReadOffset
    Offset of read pointer from the beginning of the map. The reader moves this pointer, followed by the data buffer. The data buffer starts at dwBufferStart and ends dwBufSize bytes beyond that.

    Valid for version 2 of this structure.

  • Signature
    Used to determine whether the map persisted across starts.
  • IsLocked
    Boolean; stop logging while locked.
  • dwSyncBufferStart
    Offset of sync buffer start from the beginning of the map.
  • dwSyncBufferSize
    Size of the sync buffer.
  • dwSyncWriteOffset
    Specifies the offset of the write pointer from the start of the sync buffer.
  • dwSyncReadOffset
    Specifies the offset of the read pointer from the start of the sync buffer.
  • dwIntBufferStart
    Specifies the offset of the interrupt buffer start from the beginning of the map.
  • dwIntBufferSize
    Specifies the size of the sync buffer.
  • dwIntWriteOffset
    Specifies the offset of the write pointer from the start of the interrupt buffer.
  • dwIntReadOffset
    Specifies the offset of the read pointer from the start of the interrupt buffer.

Remarks

This structure specifies different members for different versions of Windows Embedded Compact. Windows Embedded Compact supports versions 1, 2, and 3.

To write a tool that works with multiple OS versions, check pWrite, pRead, and dwVersion, and then adapt accordingly.

Programming and diagnostic tools that are included with Compact 2013 are backward compatible, so they can be used to debug older versions of Windows Embedded Compact.

Requirements

Header

celog.h

See Also

Reference

CeLog Event Tracking Structures