Im experimenting with dll's as they are a new topic for me. Let me get this straight - after reading iczelions, i understand that a DLL's .code is reused throught different processes, but the .data section is saved individually for each process. So, as a side thaught, i tried to modify part of the code section (which would normall be "ok" in normal .exe's) - and naturally, windows crashed it for me. Does windows protect the dll's .code section from modifications in some way? Doesnt that mean i cant have self modifing code in dll's or is there a way round it?
Thanks :U
RedXVII
as it happens I was looking for standard techniques, and I came across this, which helped,
http://doc.ddart.net/asm/Microsoft_MASM_Programmers_Guide_v6.1/Chap_10.htm
hope its of some use
dougiem
Nice one, thx :U
Red,
Have a play with making the secftions read/write/execute and it should solve most of your problems. They are linker options.
Quote from: RedXVII on July 03, 2006, 12:19:21 AMi tried to modify part of the code section (which would normall be "ok" in normal .exe's) - and naturally, windows crashed it for me. Does windows protect the dll's .code section from modifications in some way?
It depends what OS you are running. Apart from making code pages writable, in WinXP SP2 it is advisable to turn off DEP (data execution protection, and surprisingly some big name apps require you to disable DEP), and in Vista the whole security scene changes dramatically.