[question] memcpy, access violation

10/02/2011 11:07 AutoItDude#1
is it ok to type cast byte buffer by (void*)?

Code:
DWORD dwAddress = 0x12345678;
BYTE bPatch[] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 };

memcpy( (void*)dwAddress, (void*)bPatch, 7);
this piece of my code was working fine till now - it is causing ACCESS VIOLATION and I can't figure out why.

edited:
nvm, it was all about memory protection.
please delete this thread.
10/02/2011 15:56 Medix#2
try [Only registered and activated users can see links. Click Here To Register...]