in some cases Windows vista/Windows 7 prevent some executable codes from running/executing probably. This happens because of Data Execution Prevention (DEP) this happens in some cases, which means, this does not apply on all machines, the API could work on different machines with the same Operating System..
Snippet from Wikipedia about this:
Data Execution Prevention (DEP) is a security feature that is intended to prevent an application or service from executing code from a non-executable memory region. This helps prevent certain exploits that store code via a buffer overflow, for example. DEP runs in two modes: hardware-enforced DEP for CPUs that can mark memory pages as non-executable, and software-enforced DEP with a limited prevention for CPUs that do not have hardware support. Software-enforced DEP does not protect from execution of code in data pages, but instead from another type of attack (SEH overwrite).
The fix/solution for this case is that we have wrote two patch files for turning on DEP and turning off DEP. This way, you will be able to turn on/off the DEP at anytime you want. You can download those patch files by clicking here.
After turning off the DEP, restart your machine.
You may get more information about DEP by Clicking Here…