Thanks for your answer!
But:
I'm new to Detours, and I'm having trouble to get your DLL to work...
The current version of Detours deos not support "DetourFunction", I had to change the DLLMain function:
Code:
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpReserved)
{
if (dwReason == DLL_PROCESS_ATTACH && !bHooked)
{
bHooked = TRUE;
OrigGet = (PGET)DetourFindFunction("fastprox.dll", "?Get@CWbemObject@@UAGJPBGJPAUtagVARIANT@@PAJ2@Z");
DetourAttach(&(PVOID&)OrigGet, (LPBYTE)NewGet);
}
return TRUE;
}
Is that correct?
Also I wonder how to inject this DLL into the .NET process...
Could this be done using "DetourCreateProcessWithDllEx"?