监视对 DLL 的应用程序调用 [英] Monitoring application calls to DLL

查看:78
本文介绍了监视对 DLL 的应用程序调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简而言之:我想监视从应用程序到 DLL 的选定调用.

In short: I want to monitor selected calls from an application to a DLL.

我们有一个旧的 VB6 应用程序,我们丢失了它的源代码(当时公司没有使用源代码控制......).此应用程序使用第 3 方 DLL.

We have an old VB6 application for which we lost the source code (the company wasn't using source control back then..). This application uses a 3rd party DLL.

我想在新的 C++ 应用程序中使用这个 DLL.不幸的是,DLL API 只是部分记录,所以我不知道如何调用一些函数.我确实有函数签名.

I want to use this DLL in a new C++ application. Unfortunately the DLL API is only partially documented, so I don't know how to call some functions. I do have the functions signature.

由于VB6应用程序使用了这个DLL,我想看看它是如何调用几个函数的.到目前为止,我已经尝试或看过 -

Since the VB6 application uses this DLL, I want to see how it calls several functions. So far I've tried or looked at -

  1. APIHijack - 要求我为每个函数编写 C++ 代码.由于我只需要记录这些值,这似乎有点矫枉过正.
  2. EasyHook - 与 1 相同,但允许使用 .NET 语言编写代码.
  3. OllyDbguHooker - 我仍然需要为每个函数编写代码,这次是在 Python 中.此外,我必须使用 struct 模块在 Python 中进行许多转换,因为大多数函数使用指针传递值.
  1. APIHijack - requires me to write C++ code for each function. Since I only need to log the values, it seems like an overkill.
  2. EasyHook - same as 1, but allows writing in the code in .NET language.
  3. OllyDbg with uHooker - I still have to write code for each function, this time in Python. Also, I have to do many conversions in Python using the struct module, since most functions pass values using pointers.

因为我只需要记录函数参数,所以我想要一个简单的解决方案.有没有什么自动化工具,我可以告诉我要监控哪些功能及其签名,然后获取详细的日志文件?

Since I only need to log functions parameters I want a simple solution. Is there any automated tool, for which I could tell which functions to monitor and their signature, and then get a detailed log file?

推荐答案

更多的 Google 搜索找到了我想要的:WinAPIOverride32.它允许写入文本文件,例如:

Some more Google searching found what I was looking for: WinAPIOverride32. It allows writing text files such as:

CustomApi.dll|void NameOfFunction(long param1, double& param2);

稍后,这些文件可用于程序内部以记录对NameOfFunction 的所有调用.现在我只需要弄清楚如何记录数组和结构参数.

Later on, these files can be used inside the program to log all calls to NameOfFunction. Now I just need to figure out how to log arrays and structs parameters.

这篇关于监视对 DLL 的应用程序调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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