.NET Questions and Solutions

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘code’

A detailed description of the Data Execution Prevention (DEP) feature in Windows XP Service Pack 2, Windows XP Tablet PC Edition 2005, and Windows Server 2003

Symptoms
Data Execution Prevention (DEP) is a set of hardware and software technologies that perform additional checks on memory to help prevent malicious code from running on a system.In Microsoft Windows XPService Pack 2 (SP2) and Microsoft Windows XP Tablet PC Edition 2005, DEP is enforced by hardware and by software.
The primary benefit of DEP is to help prevent code execution from data pages. Typically, code is not executed from the default heap and the stack. Hardware-enforced DEP detects code that is running from these locations and raises an exception when execution occurs. Software-enforced DEP can help prevent malicious code from taking advantage of exception-handling mechanisms in Windows.
Resolution
This article describes the DEP feature in Windows XP SP2 and in Microsoft Windows Server 2003 with Service Pack 1 (SP1) and discusses the following topics: Hardware-enforced DEPSoftware-enforced DEPBenefitsSystem-wide configuration of DEPPer-program DEP configuration

A C++ exception that is thrown in a DLL module causes an Illegal Instruction exception

Symptoms
A C++ exception result is not caught in the enclosing C++ exception handler.
This behavior occurs when certain code in one module calls a function in a different module. Specifically, when the code in the try block calls a function in an EXE module or in a DLL module that is different from the module that contains the try block and the C++ exception handler.
This behavior may cause unexpected behavior or may cause the application to stop responding.
When you use the Embedded Visual C++ debugger, the debugger may report the following exception:

0xC000001D Illegal Instruction
Resolution
This problem occurs because the ARM compiler does not generate the correct code for the C++ exception handler when a function in a different EXE module or DLL module is called.