问题描述
简而言之:我想监控从应用程序到DLL的所选呼叫。我们有一个旧的VB6应用程序,我们丢失了源代码(公司当时没有使用源代码控制..)。此应用程序使用第三方DLL。
我想在一个新的C ++应用程序中使用此DLL。不幸的是,DLL API只是部分记录在案,所以我不知道如何调用一些函数。我有功能签名。
由于VB6应用程序使用这个DLL,我想看看它如何调用几个函数。到目前为止,我已经试过或看过 -
- - 要求我为每个函数编写C ++代码。由于我只需要记录这些值,所以看起来好像是一个过分的杀手。
- - 与1相同,但允许使用.NET语言编写代码。
- , - 我还是要写代码对于每个函数,这一次在Python中。此外,我必须使用
struct
模块在Python中进行许多转换,因为大多数函数使用指针传递值。
由于我只需要记录功能参数,我想要一个简单的解决方案。有没有任何自动化工具,我可以告诉哪些功能要监视和签名,然后获取详细的日志文件?
p>更多的Google搜索找到我要找的内容:。它允许编写文本文件,例如:
CustomApi.dll | void NameOfFunction(long param1,double& param2);
稍后,程序中可以使用这些文件将所有调用记录到 NameOfFunction
。现在我只需要弄清楚如何记录数组和结构参数。
In short: I want to monitor selected calls from an application to a 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.
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.
Since the VB6 application uses this DLL, I want to see how it calls several functions. So far I've tried or looked at -
- APIHijack - requires me to write C++ code for each function. Since I only need to log the values, it seems like an overkill.
- EasyHook - same as 1, but allows writing in the code in .NET language.
- 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?
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);
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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!