示例#1
0
        static SetWindowTextAHook()
        {
            var funcAddr = DetourEngine.GetFunctionAddress("User32.dll", "SetWindowTextA");

            HookedInstance   = HSetWindowTextA;
            OriginalInstance = Marshal.GetDelegateForFunctionPointer <SetWindowstextADelegate>(funcAddr);

            DEngine = new DetourEngine(funcAddr, Marshal.GetFunctionPointerForDelegate(HookedInstance));
        }
示例#2
0
        static LoadLibraryAHook()
        {
            var funcAddr = DetourEngine.GetFunctionAddress("Kernel32.dll", "LoadLibraryA");

            HookedInstance   = HLoadLibraryA;
            OriginalInstance = Marshal.GetDelegateForFunctionPointer <LoadLibraryADelegate>(funcAddr);

            DEngine = new DetourEngine(funcAddr, Marshal.GetFunctionPointerForDelegate(HookedInstance));
        }