Giter Club home page Giter Club logo

memops's Introduction

MemOps

This is a fully documented library that enhances the process of metaprogramming by abstracting away the most common memory operations and pointer arithmetic in the classes provided with a nod to performance. All classes are public, so you can get as close as you want to the imported Win32 functions.

Available Classes

With a multitude of classes placed in the hands of the user, working with memory is easier than ever. Here are the most common classes you may find yourself using from this library:

  1. BufferedMemoryAddress
  2. MemoryOps
  3. ProcessOps
  4. ProcessAccessRights
  5. And the provided extension classes

Basic Usage: Opening a Process

To begin using the MemOps library on other processes, you will want to start by opening a handle to the process in mind. You can do this functionally with ProcessOps using the PID or an instance of Process, or use the extension method provided to instances of Process. You will need to know what kind of process access rights you want for your program. All of the possible rights are available in the ProcessAccessRights enum, all forwarded uint flags made public from Win32's PROCESS_ACCESS_RIGHTS.

If you don't need to open a handle, then you can skip this part.

Basic Usage: Using the Win32 Function Abstractions

To use this in a safe code context, create a new BufferedMemoryAddress and go wild with the possibilities. Because of the nod to performance, it's even possible to bypass the object's buffer entirely in the read and write methods.

Usage of the library's abstractions in a safe context comes from users interacting with the library using native integers while unsafe pointers (like void*) are done internally.

If you need to create multiple BufferedMemoryAddresses, this class comes with a builder to make doing this a breeze. No need to pass a handle or set the buffer over and over again; just use the builder.

Basic Usage: Interacting with the Win32 External Functions Directly

If you choose to not use any of the abstractions provided, interacting with the Win32 functions is still made super easy to work with, mostly thanks to the CsWin32 library provided by Microsoft that uses metadata to generate the most compatible DLLImport signatures trusted by a large amount of developers.

To use ReadProcessMemory and WriteProcessMemory with this class, you will need to use the forwarded Win32 functions in MemoryOps. The signatures are largely the same but are slightly different to provide more functionality to reading and writing.

memops's People

Contributors

grovre avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.