delphi5下编写的dll在xp下如何跟踪呢?dll是在delphi5下编写的,win2k下跟踪没有问题,为什么xp下不可以呢?恳请高手相助!!!

解决方案 »

  1.   

    再帮你顶顶,我用的系统是win2000
      

  2.   

    在WIN2下是如何实现的。你贴出来看看撒。大家都很想知道哦!
      

  3.   

    在XP中,如果在DLL中下断点,Delphi不会中断下来,怎么回事儿呢?(恐怕又是M$的诡计,:))
    解决方法:
    Until up to Win2k, you had to set the HostApplication on Start=>Parameter to 
    debug a DLL. This will not work on Windows XP. 
    在Win2K中,你可以设置Run-->Parameter对话框中的HostApplication来调试DLL,但是在WinXP中,将不会正常工作! That Delphi will know the DLL if you run the progam, you have to do the 
    following: 
    要让Delphi在运行程序的时候,知道你的DLL,你必须作如下的工作:The program must load the DLL. After this, press Ctrl-Alt-M in Delphi, to list 
    all modules. Sometimes there will be the DLL with path. 
    首先,程序必须加载这个DLL,之后,请在Delphi中按Ctrl+Alt+M,这个时候会列出所有的模块,有一些模块回带有路径。Solution: 
    解决方案:Right click on the DLL, select "Reload symbols" and set the full path to the 
    DLL. Now the breakpoints should be active. 
    右击那个DLL,选择“Reload Symbols”,并且设置这个DLL的全路径,设置之后,你的断点应该有效了。When the DLL will be compiled in the system path (directory in PATH) this 
    problem dont occur. 
    如果DLL编译的输出目录在系统路径(PATH环境变量的路径中)中,那么不会出现这个问题。
      

  4.   

    XP下需要手动加载dll模块 要加载两次!1。设置断点,设置运行参数(如果需要的话)
    2。按F9开始跟踪,程序跑起来后,Delphi下 按 ctrl+alt+M ,弹出Modules窗口(右击都是文字的那一块区域,选择add module 选择你编译路径下的dll)【第一次加载模块】
    3。开启调用dll的程序,这时delphi 5 会自己弹出cpu窗口,再按ctrl+alt+M,弹出Modules窗口 找到列表中你加载进来的哪个dll,右击选择 reload symble table... 选择你编译路径下的dll)【第二次加载模块】
    4。按F7,F8或F9可以开始跟踪了够清楚不?
      

  5.   

    第二次加载的时候(Reload 时)一定要找到那个dll文件,提供完整路径(c:\path\test.dll) 而不是单纯的(test.dll)