Partager via


CEL_MAPFILE_CREATE (Compact 2013)

3/28/2014

This structure logs the creation of a memory-mapped file. This event is logged when an application uses CreateFileMapping to create the first reference to a file-mapping object.

Syntax

typedef struct __CEL_MAPFILE_CREATE { 
  HANDLE hMap;
  DWORD  flProtect;
  DWORD  dwMapFlags;
  DWORD  dwMaxSize;
  WCHAR  szName[0];
} CEL_MAPFILE_CREATE, *PCEL_MAPFILE_CREATE;

Members

  • hMap
    Handle of the file-mapping object that was created. This value is returned by CreateFileMapping.
  • flProtect
    Protection desired for the file view when the file is mapped. The following table shows possible values for this parameter.

    Value

    Description

    PAGE_READONLY

    Gives read-only access to the committed region of pages. An attempt to write to or execute the committed region results in an access violation. The file specified by the hFile parameter must have been created with GENERIC_READ access. You cannot specify PAGE_READONLY without a file handle.

    PAGE_READWRITE

    Gives read-write access to the committed region of pages. The file specified by hFile must have been created with GENERIC_READ and GENERIC_WRITE access.

    PAGE_WRITECOPY

    Not supported.

  • dwMapFlags
    The following table shows the possible values for dwMapFlags.

    Value

    Description

    0x00000002

    Indicates the map is always flushed atomically; that is, all pages are flushed or no pages are flushed.

    0x00000004

    Indicates that the file has been mapped directly from ROM without consuming any additional physical memory.

    0x00000008

    Indicates that this file must not be background flushed.

    The kernel flushes this file only on calls to FlushViewOfFile or UnmapViewOfFile, or when running low on memory. This flag is only used when the atomic flag is set.

    0x00000010

    The map is flushed to improve flush speed.

  • dwMaxSize
    Specifies the maximum size of the file-mapping object.
  • szName
    Optional. Indicates name of the file-mapping object. The length of the name is inferred from the event length.

Requirements

Header

celog.h

See Also

Reference

CeLog Event Tracking Structures
CEL_MAPFILE_DESTROY

Other Resources

CreateFileMapping