简体   繁体   中英

C++ Proxy DLL (64-Bit)

I used a tool called wrappit to generate proxy dll files. The tool can be found here: http://www.codeproject.com/Articles/16541/Create-your-Proxy-DLLs-automatically

But the target DLL is compiled as a 64bit and because Visual Studio doesn't support 64-bit inline assembly, and am unaware of any other options, I am unable to go further.

This is one function:

extern "C" __declspec(naked) void __stdcall __E__312__()
{
__asm
    {
    jmp p[312*4];
    }
}

Naked/inline asm is not supported and give compiler errors.

What can I do?

There is no inline asm in x64 world, and even if you find some substitution (intrinsics?), there is no support for __declspec(naked) as well

What exactly are you trying to do? Are you trying to intercept some call in foreign (for you) DLL?

If this is the case, there is thing from Microsoft called Detours, heard it is pretty good, never use it

http://research.microsoft.com/en-us/projects/detours/

You might want to look at MinHook as an alternative, this one is good

http://www.codeproject.com/Articles/44326/MinHook-The-Minimalistic-xx-API-Hooking-Libra

Also, you can intercept any function with Deviare in-proc as Detours alternative. It works perfect in both x86 and x64, it's open source and it's well maintained.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM