| Previous | Next |
| STATUS_PREDEFINED_HANDLE | STATUS_SERVICE_NOTIFICATION |
STATUS_WAS_UNLOCKED
The protection change invalidated the previous page lock
A page locked through the process memory APIs must remain accessible under the assumptions used when it was locked. Changing the region to no access breaks those assumptions, so Windows can unlock it while completing the protection change. This warning reports that side effect rather than a failure of the protection operation.
The caller should update its own lock bookkeeping. Later calling VirtualUnlock as though the page were still locked can produce a different error and hide the original transition. If hardware or kernel code still uses the buffer, protection must not be changed until the corresponding I/O ownership has ended.
What to inspect
- Identify the protection change and the exact locked range that overlapped it.
- Update application or driver state so an automatic unlock is not followed by a duplicate unlock.
- Verify no DMA, asynchronous I/O, or worker still relies on the previous accessibility of the pages.
References
- Microsoft: VirtualLock
- Microsoft: VirtualUnlock
- Microsoft: VirtualProtect
- Microsoft Open Specifications: NTSTATUS values
Looking for a different code? Search another status or error code.
