Esempio n. 1
0
        public static IntPtr MAllocString(Process Target, string String, bool Unicode)
        {
            if (String == null)
            {
                return(IntPtr.Zero);
            }

            var Enco = Unicode ? Encoding.Unicode : Encoding.Default;

            return(MemoryManagement.MAlloc(Target, Enco.GetBytes(String + "\x0")));
        }
Esempio n. 2
0
 /// <summary>
 /// Free a allocated content that has allocated by the MAlloc
 /// </summary>v
 /// <param name="Process">The process to release the content</param>
 /// <param name="Address">The address of the content to be released</param>
 /// <param name="Length">The length to be released</param>
 public static void MFree(this Process Process, IntPtr Address) => MemoryManagement.MFree(Process, Address);
Esempio n. 3
0
 /// <summary>
 /// Automatically Alloc the <paramref name="Content"/> to the target process
 /// </summary>
 /// <param name="Content">The content to alloc</param>
 /// <param name="Executable">Make this allocated content executable</param>
 /// <returns>The pointer to the allocated content</returns>
 public static IntPtr MAlloc(this Process Process, byte[] Content, bool Executable = false) => MemoryManagement.MAlloc(Process, Content, Executable);