Exemplo n.º 1
0
        public static NetHook CreateInstance(IntPtr oldMethodAddress, IntPtr newMethodAddress)
        {
            NetHook hook = NetHook.CreateInstance();

            try
            {
                return(hook);
            }
            finally
            {
                hook.Install(oldMethodAddress, newMethodAddress);
            }
        }
Exemplo n.º 2
0
 public static NetHook CreateInstance(IntPtr oldMethodAddress, Delegate newMethodDelegate)
 {
     return(NetHook.CreateInstance(oldMethodAddress, Marshal.GetFunctionPointerForDelegate(newMethodDelegate)));
 }