Page 1 of 1

.code section

Posted: Fri Feb 24, 2006 10:18 pm
by frederic
Hello,
How to do to make .code section writeable in purebasic ??
by default this section is executable & readable

frederic

Posted: Sat Feb 25, 2006 5:40 pm
by El_Choni

Code: Select all

VirtualProtect_(?StartAddress, Length, #PAGE_WRITECOPY, @oldProtect)
And, to restore non-writeability:

Code: Select all

VirtualProtect_(?StartAddress, Length, #PAGE_EXECUTE, @oldProtect)

Posted: Sat Feb 25, 2006 8:20 pm
by frederic
thanks it works perfectly :)