如何在XP中调试DLL

I

import

Unregistered / Unconfirmed
GUEST, unregistred user!
在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环境变量的路径中)中,那么不会出现这个问题。
 

Similar threads

回复
0
查看
647
不得闲
D
回复
0
查看
730
DelphiTeacher的专栏
D
D
回复
0
查看
702
DelphiTeacher的专栏
D
D
回复
0
查看
673
DelphiTeacher的专栏
D
顶部