windows shared memory -- msdn document of the file mapping object

EXECUTE? Execute addresses within the shared memory?

  1. CreateFileMapping

    • PAGE_READONLY

      Allows views to be mapped for read-only or copy-on-write access. An attempt to write to a specific region results in an access violation.

    • PAGE_READWRITE

      Allows views to be mapped for read-only, copy-on-write, or read/write access.

    • PAGE_WRITECOPY

      Allows views to be mapped for read-only or copy-on-write access. This value is equivalent to PAGE_READONLY.

    • PAGE_EXECUTE_READ

    • PAGE_EXECUTE_READWRITE
    • PAGE_EXECUTE_WRITECOPY
  2. MapViewOfFile

    • FILE_MAP_ALL_ACCESS

      When used with the MapViewOfFile function, FILE_MAP_ALL_ACCESS is equivalent to FILE_MAP_WRITE.

    • FILE_MAP_WRITE

      A read/write view of the file is mapped. The file mapping object must have been created with PAGE_READWRITE or PAGE_EXECUTE_READWRITE protection.

      When used with MapViewOfFile, (FILE_MAP_WRITE | FILE_MAP_READ) and FILE_MAP_ALL_ACCESS are equivalent to FILE_MAP_WRITE.

    • FILE_MAP_READ

      A read-only view of the file is mapped. An attempt to write to the file view results in an access violation.

      The file mapping object must have been created with PAGE_READONLY, PAGE_READWRITE, PAGE_EXECUTE_READ, or PAGE_EXECUTE_READWRITE protection.

    • FILE_MAP_COPY

      A copy-on-write view of the file is mapped. The file mapping object must have been created with PAGE_READONLY, PAGE_READ_EXECUTE, PAGE_WRITECOPY, PAGE_EXECUTE_WRITECOPY, PAGE_READWRITE, or PAGE_EXECUTE_READWRITE protection.

      When a process writes to a copy-on-write page, the system copies the original page to a new page that is private to the process. The contents of the new page are never written back to the original file and are lost when the view is unmapped.

  3. OpenFileMapping
    This access is checked against any security descriptor on the target file mapping object. For a list of values, see File Mapping Security and Access Rights.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章