VirtualQuery- get the access protection
i want to go over the addresses of a process and get the access protect of the blocks .
so there are many constants which present the protect:
PAGE_EXECUTE - 0x10
PAGE_EXECUTE_READ - 0x20
PAGE_EXECUTE_WRITECOPY - 0x80
PAGE_NOACCESS - 0x01
PAGE_READWRITE - 0x04
PAGE_WRITECOPY - 0x08
PAGE_GUARD - 0x100
PAGE_NOCACHE - 0x200
PAGE_WRITECOMBINE - 0x400
now i can check if MEMORY_BASIC_INFORMATION.protect (of a specific block) is equal to one of the access protects above.
but what if the access protect is combined with some access protects? (with | ? )
what is the best solution to solve it?