Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows API
  4. C++ ATL DLL Addin for Windows Mail is blocked by Vista's DEP

C++ ATL DLL Addin for Windows Mail is blocked by Vista's DEP

Scheduled Pinned Locked Moved Windows API
c++visual-studiocsharpsecurityhelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dolly
    wrote on last edited by
    #1

    Hello Friends, I am using Windows Vista and I am builing an c++ ATL DLL in Visual C++ 6.0, which is an addin DLL for Windows Mail. (Outlook Express) When I run my Windows Mail, Vista's DEP (Data Execution Prevention) feature blocks it, and prompts that it blocked for security purpose as some other program tried to use windows mail data. But I have to hook into Windows Mail as have to put an addin to customize its GUI. I tried to turn DEP off for Windows Mail, but it didnt allow me (even in Full Admin Account). Also I turned DEP off for my exe (which loads my addin DLL, which further hooks into Windows Mail), but despite that Windows Mail is blocked. Also, when I build the project in Visual Studio 2005, it runs very well. (And I have not made any change in the project settings or code) It seems, VC 6 uses older compilers and VS 2005 uses latest ones so are compatible with Vista! But I have to use VC 6 only as it's my project's requirement! Please Help! Thanks a lot !!

    dolly, N,IN

    M 1 Reply Last reply
    0
    • D dolly

      Hello Friends, I am using Windows Vista and I am builing an c++ ATL DLL in Visual C++ 6.0, which is an addin DLL for Windows Mail. (Outlook Express) When I run my Windows Mail, Vista's DEP (Data Execution Prevention) feature blocks it, and prompts that it blocked for security purpose as some other program tried to use windows mail data. But I have to hook into Windows Mail as have to put an addin to customize its GUI. I tried to turn DEP off for Windows Mail, but it didnt allow me (even in Full Admin Account). Also I turned DEP off for my exe (which loads my addin DLL, which further hooks into Windows Mail), but despite that Windows Mail is blocked. Also, when I build the project in Visual Studio 2005, it runs very well. (And I have not made any change in the project settings or code) It seems, VC 6 uses older compilers and VS 2005 uses latest ones so are compatible with Vista! But I have to use VC 6 only as it's my project's requirement! Please Help! Thanks a lot !!

      dolly, N,IN

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      Vista SP1 has a new DEP feature that's supposed to detect ATL's 'thunks' that it uses to fix up the 'this' pointer when calling a window message handler function. As I recall this is on by default. Are you using Vista SP1? DEP is, by default, in 'opt-out' mode. However, if a process' executable is compiled with the /NXCOMPAT linker option, it opts in and you can't do anything about it. The problem is that the thunks in ATL 3.0 are allocated with the window object itself - they're members of the structure. The heap that ATL creates is not marked to allow execution.

      DoEvents: Generating unexpected recursion since 1991

      D 1 Reply Last reply
      0
      • M Mike Dimmick

        Vista SP1 has a new DEP feature that's supposed to detect ATL's 'thunks' that it uses to fix up the 'this' pointer when calling a window message handler function. As I recall this is on by default. Are you using Vista SP1? DEP is, by default, in 'opt-out' mode. However, if a process' executable is compiled with the /NXCOMPAT linker option, it opts in and you can't do anything about it. The problem is that the thunks in ATL 3.0 are allocated with the window object itself - they're members of the structure. The heap that ATL creates is not marked to allow execution.

        DoEvents: Generating unexpected recursion since 1991

        D Offline
        D Offline
        dolly
        wrote on last edited by
        #3

        Mike Dimmick wrote:

        Vista SP1 has a new DEP feature that's supposed to detect ATL's 'thunks' that it uses to fix up the 'this' pointer when calling a window message handler function. As I recall this is on by default. Are you using Vista SP1? DEP is, by default, in 'opt-out' mode. However, if a process' executable is compiled with the /NXCOMPAT linker option, it opts in and you can't do anything about it. The problem is that the thunks in ATL 3.0 are allocated with the window object itself - they're members of the structure. The heap that ATL creates is not marked to allow execution

        Hi Mike, Thanks for replying! I am not using SP1, just using ultimate edition of Vista! Dont know the same thing works for the plugin dll build in VS 2005. but not with VC++ 6.0??? Do we have some compiling or linking options that we can set while building the DLL so that it will not be blocked by DEP when running Windows Mail?? Thanks!

        dolly, N,IN

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups