The following table lists the memory-protection options provided by Windows. You must specify one of the following values when allocating or protecting a page in memory.
Value | Meaning |
---|---|
PAGE_EXECUTE | Enables execute access to the committed region of pages. An attempt to read or write to the committed region results in an access violation. |
PAGE_EXECUTE_READ | Enables execute and read access to the committed region of pages. An attempt to write to the committed region results in an access violation. |
PAGE_EXECUTE_READWRITE | Enables execute, read, and write access to the committed region of pages. |
PAGE_EXECUTE_WRITECOPY | Enables execute, read, and write access to the committed region of pages. The pages are shared read-on-write and copy-on-write. |
PAGE_NOACCESS | Disables all access to the committed region of pages. An attempt to read from, write to, or execute the committed region results in an access violation exception, called a general protection (GP) fault.(memory中常看到的?形式) |
PAGE_READONLY | Enables read access to the committed region of pages. An attempt to write to the committed region results in an access violation. If the system differentiates between read-only access and execute access, an attempt to execute code in the committed region results in an access violation. |
PAGE_READWRITE | Enables both read and write access to the committed region of pages. |
PAGE_WRITECOPY | Gives copy-on-write protection to the committed region of pages.
Windows Me/98/95: This flag is not supported.
|