Deactivating Data Execution Prevention with NXCOMPAT

  • Thread starter Thread starter Andrew Marshall
  • Start date Start date
A

Andrew Marshall

Hi there.

I've recently converted our .NET application to VS 2008 and started to have
problems ( a cross thread call exception that was clearly erroneous ) with a
3rd party ActiveX control we use when running on 64bit Vista. After some
research I suspected this was down to DEP and so after consulting Ed
Maurer's blog entry,

http://blogs.msdn.com/ed_maurer/archive/2007/12/14/nxcompat-and-the-c-compiler.aspx

I managed to circumvent the problem by turning off the NXCOMPAT bit in the
binary with a post build event.

As an interim solution for development purposes I am fine with this, but
what are the disadvantages? The application is not particularly security
sensitive so DEP is not of particular interest - but am I likely to run into
compatibility problems in future?

Regards,
Andrew Marshall
Senior Software Engineer
Leica-Microsystems.
 
Hi Andrew,

As for the DEP setting, I think whether you mark the flag in your exe
image will not quite concerns to future compatibility(at least from the OS
DEP configuration's perspective). Because the DEP behavior is still mainly
controlled by the OS's DEP policy. If the system admin always turn on DEP,
even if you set it off in your exe, the application will still fail.

#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
http://support.microsoft.com/kb/875352

Just like vista UAC, you can add manifest into your exe program to indicate
that whether your application is UAC ready(or require elevation of
privilege), but the actual behavior is still determined by whether UAC is
turn on or off on the target box.

Therefore, so far since your application will require turning off the DEP,
I think it's the reasonable approach to set it off via the flag in your exe.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.




--------------------
 
Back
Top