PAGE_FAULT_IN_NONPAGED_AREA (50)
Invalid system memory was referenced. This cannot be protected by try-except,
it must be protected by a Probe. Typically the address is just plain bad or it
is pointing at freed memory.
Arguments:
Arg1: fdffffff, memory referenced.
Arg2: 00000001, value 0 = read operation, 1 = write operation.
Arg3: 805e67d5, If non-zero, the instruction address which referenced the bad memory
address.
Arg4: 00000000, (reserved)
// copy contents of our function into non paged memory
// with a cap at 256 bytes (beware of possible read off end of page FIXME)
for(i=0;i<256;i++)
{
((unsigned char *)non_paged_memory)[i] = ((unsigned char *)my_function_detour_seaccesscheck)[i];
}