DEP blocks because of bugs - namely, trying to execute code in stack- or heap-based memory. Fix bugs, no DEP. It's opt-in in 32-bit code by default on XP and Windows Vista; if you're running a server operating system I think the default is opt-out. Go to the System control panel, Advanced tab and click Settings under Performance to add new opt-outs. Programs can be compiled with a /NXCOMPAT option which tells Windows that this program is aware of DEP - these programs cannot be opted out of DEP. 64-bit code is expected to be DEP-compatible as all x64 processors support hardware DEP - 64-bit code cannot opt out. Windows Vista Service Pack 1 added more support for legacy ATL 'thunks' - if detected, it emulates the thunk code rather than close the program.
"Multithreading is just one damn thing after, before, or simultaneous with another." - Andrei Alexandrescu