Re: Running exe on Windows Server 2008 R2 Standard
- Posted by jimcbrown (admin) Apr 08, 2014
- 1656 views
However now I've run into another problem. I'm using the words.e library (poke2,peek2 etc..) provided by Bernie Ryan/Rolf Schroeder. Unfortunatly this library produces a machine exception and crashes. It seems that the assembler code used is not compatible. Since I don't know assembler I cannot fix it. Perhaps if Bernie or Rolf are still following this forum they could weigh in on what changes would be needed to make words.e compatible.
I suspect the issue is DEP. words.e is very old (perhaps even from the 9x days?) and most assembly code from those days worked by allocating a piece of memory, dumping the raw machine code into it, and then calling it.
Thanks to DEP, you can no longer call just any block of memory. Special steps must be taken to enable a block of memory to switch from being writable to being callable.
As a side note. Since poke2 and peek2 are now part of 4.x does anyone know if 4.x will have same issue with those functions on win2008R2?
It won't. Since these are internal calls, they are loaded directly by the operating system (well, more-or-less), which takes care of the memory allocation and DEP behind the scenes. Also, there's no need to write to the block of memory containing the internal code after the OS has finished with it (unlike the case with words.e, where we have to allocate it and then write to it and then run it - having executable code in memory that is concurrently writable is what the inventors of DEP were trying to prevent, in the name of security.).