ID: Q170426
The information in this article applies to:
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: 95 VirtualProtect VirtualProtectEx Win95
Keywords : kbAPI kbKernBase kbGrpKernBase
Version : WINDOWS:95
Platform : Win95
Issue type : kbprb
Last Reviewed: January 17, 1998