Ejemplo n.º 1
0
        public static bool UnloadRemoteLibrary(Process p, string module)
        {
            IntPtr moduleHandle = Kernel32.FindModuleHandle(p, module);
            IntPtr address      = Kernel32.WriteObject(p, (object)moduleHandle);
            int    num          = Kernel32.CallRemoteFunction(p, "kernel32.dll", "FreeLibrary", address) ? 1 : 0;

            Kernel32.FreeObject(p, address);
            return(num != 0);
        }
Ejemplo n.º 2
0
        public static bool LoadRemoteLibrary(Process p, object module)
        {
            IntPtr address = Kernel32.WriteObject(p, module);

            int num = Kernel32.CallRemoteFunction(p, "kernel32.dll", "LoadLibraryW", address) ? 1 : 0;

            Kernel32.FreeObject(p, address);
            return(num != 0);
        }