如何在C ++中调试vs2008创建的dll [英] How to debug an dll create by vs2008 in C++

查看:134
本文介绍了如何在C ++中调试vs2008创建的dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为MetaTrader 4创建了一个dll(Forex Treader软件,其中包含类似C的程序语言).我知道如何导入自己创建的dll.但是我不知道调试vs2008创建的dll的最佳方法.我只是在MetaTrader中创建一个脚本来测试dll(每次更新dll时,都必须将更新的dll复制到脚本可以将其导入的正确位置.非常繁琐).

有没有更简单的方法来做这些事情?

I create a dll for the MetaTrader 4(an Forex Treader Software which has a C-like program language in it). I know how to import dll create by myself. But I don''t know the best way to debug the dll created by vs2008. I just create a Script in MetaTrader to test the dll (every time I update the dll, I must copy the updated dll to the right place where the Script can import it.very tedious).

Is there a simpler way to do that things? Please tell me if there is, thanks.

推荐答案

您可以像Visual Studio中的任何其他应用程序一样调试DLL.您所要做的就是告诉Studio哪个可执行文件将加载dll,然后您就可以从那里进行调试了.描述如下:
http://msdn.microsoft.com/en-us/library/605a12zt%28v = VS.90%29.aspx [ ^ ]

如果以这种方式进行调试,则将拥有可用的所有Studio调试功能(断点,TRACE语句,输出窗口等).
You can debug a DLL just like any other application in Visual Studio. All you have to do is tell Studio what executable will load the dll and you''ll be able to debug from there. Here''s a description:
http://msdn.microsoft.com/en-us/library/605a12zt%28v=VS.90%29.aspx[^]

If you debug in this manner, you''ll have all Studio''s debug capabilities available to you (breakpoints, TRACE statements, output window, etc.).


设置输出路径(项目设置)到加载DLL的目标路径.
问候.
Set the output path (project settings) to the target path where the DLL is loaded from.
Regards.


您真不走运.

过去曾经可以调试MT4 DLL.但是较新版本的Metatrader终端具有Themida的调试保护,并且在检测到调试器时会故意崩溃.因此,诀窍是找到Themida无法检测到的调试器. (到目前为止,我还没有找到一个,但是我不是调试器方面的专家.)
You are out of luck.

It used to be that MT4 DLLs could be debugged. But newer versions of the Metatrader terminal have debugging protection by Themida and will crash on purpose when it detects a debugger. So the trick would be to find a debugger that Themida does not detect. (So far I havent found one, but I am not expert on debuggers).


这篇关于如何在C ++中调试vs2008创建的dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆