取得某一dll所有输出函数名
2002-01-17 10:19
405 查看
取得某一dll所有输出函数名
在uses里加上ImageHlp
procedure 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^)[I]=#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;
procedure TForm1.Button1Click(Sender: TObject);
var
List: TStrings;
I: integer;
S: String;
begin
List := TStringList.Create;
ListDLLFunctions('c:/windows/system/Abcsda.dll', List);
showmessage(inttostr(list.count));
S := 'List of functions';
for I := 0 to List.Count - 1 do
S := S + #13#10 + List[I];
ShowMessage(S);
List.Free
end;
//rock
//转载请保留此信息
在uses里加上ImageHlp
procedure 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^)[I]=#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;
procedure TForm1.Button1Click(Sender: TObject);
var
List: TStrings;
I: integer;
S: String;
begin
List := TStringList.Create;
ListDLLFunctions('c:/windows/system/Abcsda.dll', List);
showmessage(inttostr(list.count));
S := 'List of functions';
for I := 0 to List.Count - 1 do
S := S + #13#10 + List[I];
ShowMessage(S);
List.Free
end;
//rock
//转载请保留此信息
相关文章推荐
- 取得某一dll所有输出函数名
- 打印文件夹中所有dll输出表中函数名称
- c#调用c++封装dll 参数为字符串输出函数的解决办法
- 如何在DLL的输出函数中返回字符串给调用者
- PHP输出当前进程所有变量 / 常量 / 模块 / 函数 / 类
- VB中创建可以输出函数的DLL
- 写一个函数返回参数二进制中 1 的个数,获取一个数二进制序列中所有的偶数位和奇数位,分别输出二进制序列。
- 输出二叉树某一层的所有结点
- 使用汇编取得PE文件导入的DLL名称和函数名称
- 1.写一个函数返回参数二进制中1的个数2.获取一个数二进制序列中所有的偶数为和奇数位,分别输出二进序列3.输出一个整数的每一位4.编程实现:两个int(32位)整数m和n的二进制表达中,有多少个位(b
- VB中创建可以输出函数的DLL 作者:TechnoFantasy
- VB中创建可以输出函数的DLL
- 使用dumpbin命令查看dll导出函数及重定向输出到文件
- 使用ida逆向分析dll动态链接库时,动态调式指定输出函数
- DLL输入和输出函数—dllinport与dllexport
- 用MFC输出所有导入函数名称时遇到的问题。
- PHP输出当前进程所有变量 / 常量 / 模块 / 函数 / 类
- 使用dumpbin命令查看dll导出函数及重定向输出到文件【轉】
- 取得Excel中某一模块内所有宏(过程)的名称
- ollydbg 中给dll 的所有导出函数下断点