dll injection
i have a dll i want to inject into another process. it conatains a function which overides an api function
i was wondering what the nijection code should look like? something like
Code:
HMODULE hinstDLL = LoadLibrary((LPCTSTR)"dll.dll");
HOOKPROC hkprcSysMsg = (HOOKPROC)GetProcAddress(hinstDLL, "CallWndProc");
// Set the hook
DWORD ThreadIdCntrl = GetWindowThreadProcessId(windowHandle, 0);
::SetWindowsHookEx(WH_CALLWNDPROC, hkprcSysMsg, hinstDLL, ThreadIdCntrl);
?
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925