Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

[Detours Library] How to call undetoured api call?

$
0
0

Hi,
I've been playing around with Detours Library lately.

There is a program P.exe with no source code available.

When running, this program loads a plugin dll called D.dll that I develop myself with Visual C++.

I need to trace the use of RegOpenKeyExW by P.exe.

So, I detoured P.exe for RegOpenKeyExW api call via DetourBinaryOpen/DetourBinaryEditImports/DetourBinaryClose,

every call to RegOpenkeyExW gets successfully detoured.

So far so good.

But the problem is that detouring applies to RegOpenKeyExW calls made by D.dll.

Since I develop it myself, i don't need and want to call detoured RegOpenKeyExW from within D.dll at all.

I search all over the internet, but can’t find any good answer.
Is this inherently impossible challenge?

If anyone knows answer for this, please show me how.

thx a lot.
ehaerim


Viewing all articles
Browse latest Browse all 15302

Trending Articles