Tech Off Thread

8 posts

Data Execution Prevention (DEP) Woes

Back to Forum: Tech Off
  • User profile image
    jh71283

    All of a sudden, my vista machine has decided that it does not like my programming style.

    When I do a certain action in my program, DEP terminates my process (the action does involve a COM interop if that makes any diffy?)

    I know what DEP is, and how to turn it off, but it will not turn off for my exe... it syas that it must run with DEP on.

    Any suggestions?

  • User profile image
    lensman

    While I have encountered similar problems, the only solution I have found is the Microsoft's universal solution:  "use FDISK on your computer and reload the operating system".

    Yes, this is not a helpful answer however after repeated attempts to fix things the only practical solution was wipe the system and reload the OS.  Every time I have gotten a DEP error it boiled down to a improperly installed application.

    Vista and your ANTI-VIRUS solution of choice will insist that it must have DEP.

  • User profile image
    dpratt71

    There is a good explanation (and fix) for this issue here.

  • User profile image
    jh71283

    dpratt71 said:
    There is a good explanation (and fix) for this issue here.
    I've temporarily switched it off entirely

    bcdedit /set nx AlwaysOff

  • User profile image
    blowdart

    jh71283 said:
    dpratt71 said:
    *snip*
    I've temporarily switched it off entirely

    bcdedit /set nx AlwaysOff
    Bad move from a security point of view.

    Are you sure you're getting the parameter types correct for the COM interop, and marshalling everything that's returned?

  • User profile image
    jh71283

    blowdart said:
    jh71283 said:
    *snip*
    Bad move from a security point of view.

    Are you sure you're getting the parameter types correct for the COM interop, and marshalling everything that's returned?
    Pretty sure, the code in question has been untouched for months, and has never had a problem.

  • User profile image
    blowdart

    jh71283 said:
    blowdart said:
    *snip*
    Pretty sure, the code in question has been untouched for months, and has never had a problem.
    Hmm weirdness. A date issue perhaps somewhere in the COM component? I know DEP has triggered for me when i forgot to marshall strings and they ended up being disposed.

  • User profile image
    dpratt71

    jh71283 said:
    blowdart said:
    *snip*
    Pretty sure, the code in question has been untouched for months, and has never had a problem.
    If you've recently installed .NET Framework 2.0 SP1 or switched to .NET Framework 3.5, then it's likely the problem has always been lurking, but previously went unnoticed.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.