C++ ATL DLL Addin for Windows Mail is blocked by Vista's DEP
-
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
-
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
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
-
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
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