Giter Site home page Giter Site logo

Comments (4)

ghorsington avatar ghorsington commented on May 8, 2024

Greetings!

Pardon for a rather late response! Unfortunately the wiki was a tad out-of-date: the latest Doorstop builds proxy winhttp.dll instead of version.dll for better compatibility.

If you build Doorstop from source, it outputs proxy.dll on purpose. Doorstop allows you to easily swap the proxying DLL (or proxy multiple DLLs at once), so at build time there is no way to know which DLL you're proxying. As such, the build outputs a generic proxy.dll which you can then rename to winhttp.dll (or to another name of the DLL you chose to proxy). You can specify the proxy functions inside the dll.def definition file.

As for the pre-build event, I'm sorry to heard that. I'll fix the issue right away. I'll close the issue once it's fixed.

from unitydoorstop.

ghorsington avatar ghorsington commented on May 8, 2024

Fixed in 5883842

from unitydoorstop.

dunawayc avatar dunawayc commented on May 8, 2024

from unitydoorstop.

ghorsington avatar ghorsington commented on May 8, 2024

You are indeed correct!
When Unity loads itself up, it looks for winhttp.dll. Owing to the nature of dll load order, it picks up the proxy dll that is in the same folder as the game executable. From that, the proxy loads the original dll to ensure any game code still works and it then proceeds to hook itself into Mono's (the runtime Unity uses to run c# code) initialization code.

Then, when Unity initializes Mono, Doorstop's hook kicks in and it loads the DLL you specify in doorstop_config.ini. From there you can patch and manipulate the game however you want: you can patch things with Harmony or you can install assembly load hooks to run code when a certain assembly is loaded.

The main appeal of Doorstop is that your code runs as the very first thing, even before any of Unity's own dlls are loaded. This allows to do some more advanced manipulations, like actually editing the game assembles (e.g. add or remove classes, add or remove fields etc) before they are loaded. Such an example is the preloader of BepInEx framework:
https://bepinex.github.io/bepinex_docs/v5.0/articles/dev_guide/preloader_patchers.html

Please refer to the updated wiki or the readme for info on how to configure Doorstop.

from unitydoorstop.

Related Issues (20)

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.