开发者

I need to call a dll that is calling 5 other dlls repeatedly in one application

I'm currently using SQLitening (www.sqlitening.com) in a C++ application where I'm calling SQLitening.dll. SQLitening.dll makes subsequent calls to SQLiteningClient.dll, Zlib.dll and SQLite3.dll. I am hooking SQLitening.dll开发者_Go百科 explicitly, executing a few functions, and then I am closing the connection and dereferencing the dll with FreeLibrary.

However, the subsequent dlls (SQLiteningClient.dll, etc) are remaining hooked to the calling process. Whenever I try to hook SQLitening.dll again, it hooks fine, but some of the functions misbehave, such as the function to query the remote database. I can't help but think this is because those dlls aren't being free'd properly. Whenever I had hooked the dll implicitly (hooking each function globally), everything worked fine as long as I kept it in memory the whole time. However, I need to do this explicitly.

Note: Fred Meier of SQLitening said that explicit linking worked fine in a PowerBasic application. I should also note that SQLitening was written in PowerBasic.

Is there any way to spawn a separate process or thread for SQLitening.dll to hook everything to, so that when I dereference SQLitening I can just kill that process? Or is there a special way to make sure that everything that SQLitening calls is being dereferenced properly? Thanks.

-Matt Phelps

-Resolution Systems


I solved the issue by just using a COM exe that loads the dll explicitly.


Just unhook your hooks or check if function is already hooked before hook it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜