Is there a way to lock a memory address, so that a program can't write to it?
Printable View
Is there a way to lock a memory address, so that a program can't write to it?
Yes, there is. One way is to use critical sections. These are meant to protect blocks of code or data.
InitializeCriticalSection()
EnterCriticalSection()
LeaveCriticalSection()
DeleteCriticalSection()
I think it's possible in VB, but I've only implemented it in C.
You can read and see examples.