PRB: VirtualProtect Limitations on Windows 95 |
Q170426
VirtualProtect() and VirtualProtectEx() functions fail with ERROR_INVALID_PARAMETER when you are setting access protection for a region of pages committed to a memory-mapped file.
VirtualProtect and VirtualProtectEx are not supported for memory that is mapped to the shared memory region (addresses between 2 GB and 3 GB), and the system memory regions (addresses between 3 GB and 4 GB). Since all memory-mapped files in Windows 95 are mapped to this region, the VirtualProtect functions are not supported for them.
This behavior is by design.
NOTE: The VirtualProtect and VirtualProtectEx() functions may succeed under certain circumstances when attempting to set access protection to PAGE_READONLY or PAGE_NOACCESS for pages in the shared memory regions. This behavior should not be relied upon, and can cause other undesirable behavior.
Additional query words: VirtualProtect VirtualProtectEx Win95
Keywords : kbAPI kbKernBase kbGrpDSKernBase
Issue type : kbprb
Technology : kbAudDeveloper kbWin32sSearch kbWin32API
|
Last Reviewed: December 16, 2000 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |