如何查看DLL文件中的内容(20分)

L

lili365

Unregistered / Unconfirmed
GUEST, unregistred user!
能否象打开一个文本文件那样浏览
 
如果是编译的就不可能了

你也想的太好了
 
如果装过M$的“快速查看”,是有点想文本编辑器的
 
用"快速查看",但只能看到导入导出函数列表,
 
我在win2000和win98下为什么找不到快速查看呢
 
先添加程序:附件->快速查看.
 
>>如何查看DLL文件中的内容

看你妈个头啊!一个二进制文件看什么看,脑袋进水了!
 
用UltraEdit32啊。
 
用Dependencies它可以看见Dll的输出函数是什么!
 
你试过Exescope吗?
http://newhua.ruyi.com/down/Exesc620.lzh
 
你看到的只能是exports函数说明,没有其他的方法,可以通过很多的编辑器查看他如editplus
ultra edit 或者快速查看。
 
用visual studio自带的Dependencies,反正dll只要看接口。
 
visual studio 下的dumpbin.exe
 
Dependencies没找到
dumpbin.exe应用错误
Exescope下载下来,解压出错

谁能介绍的更详细些

 
最简单的办法就是装visual studio, 选择全装. 然后在开始菜单
microsoft visual studio 6.0 tools/depends

具体对应位置
"C:/Program Files/Microsoft Visual Studio/Common/Tools/DEPENDS.EXE".
如果不想安装visual studio的话,搜索一下光盘,查"depends.exe"应该就可以找到.
不过可能要带一些dll, 缺什么就拷什么就行了.
 
lili365
你的Email是?
我发给你Exescope,可否?
 
fyrab是个好同志,热于助人!
 
谢谢你,小(大)人物。
别夸我,我会骄傲的!:)
fyrab@sina.com
 
我晕啊,用Exescope不如直接用Visual C++打开算了
用Dumpbin最好了,快速查看98才有
 
最多看个函数名。参数是看不到的 这个函数是我在程序员大本营上找到的
我将代码贴出。大家直接可以用
procedure TForm1.ListDLLFunctions(DLLName: string; List: TStrings);
type
chararr = array[0..$FFFFFF] of char;
var
h: THandle;
i, fc: integer;
st: string;
arr: pointer;
ImageDebugInformation: PImageDebugInformation;
begin
List.Clear;
DLLName := ExpandFileName(DLLName);
if FileExists(DLLName) then
begin
h := CreateFile(PChar(DLLName),
GENERIC_READ,
FILE_SHARE_READ or FILE_SHARE_WRITE,
nil,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
0);
if h <> INVALID_HANDLE_VALUE then
try
ImageDebugInformation := MapDebugInformation(h, PChar(DLLName), nil, 0);
if ImageDebugInformation <> nil then
try
arr := ImageDebugInformation^.ExportedNames;
fc := 0;
for i := 0 to ImageDebugInformation^.ExportedNamesSize-1 do
if chararr(arr^) = #0 then
begin
st := PChar(@chararr(arr^)[fc]);
if length(st)>0 then List.Add(st);
if (i>0) and (chararr(arr^)[i-1]=#0) then Break;
fc := i+1;
end;
finally
UnmapDebugInformation(ImageDebugInformation);
end;
finally
CloseHandle(h);
end;
end;
end;
加上下面一句再在你的FORM1上放个打开文件的对话框加一个LISTBOX
那么一个查看DLL函数内容的小工具就生成了
procedure TForm1.Button1Click(Sender: TObject);
begin
opendialog1.Execute;
ListDLLFunctions(opendialog1.FileName, Listbox1.items);
end;
 
后退
顶部