tags:

views:

47

answers:

0

Hello everyone, I just rediscovered an old program which I originally wrote for windows XP. What it should do is change the permissions of a dll already loaded in the process memory.

But with win7 the virtualprotect call fails with error 487 (Attempt to access invalid address).

The function call looks like this: VirtualProtect((void*)hModule, pOptionalHeader->SizeOfImage, PAGE_EXECUTE_READWRITE, &oldProtect) (I am almost 100% sure, that this exact call worked well under XP)

So my questions are: what has been changed, that makes the call fail now and what can I do to make it work again ?

Please help me, writing that program was a lot of work as I recall it would be sad if I couldn't use it anymore :)