Skip to content

Could not load type error #28

Open

Description

@xxbeefydjxx

Hi,

Apologies if this is the wrong project, but

Using a custom C++ DLL injected into a game to load the X86 C# .NET Framework 4.7.2 DLL using Reloaded.Hooks, I get the below error regarding types.

Reloaded.Memory, and Reloaded.Memory.Buffers are installed in NuGET, the while DLL is packed up using Fody Weavers.

As below:
Error: System.TypeLoadException: Could not load type 'Reloaded.Memory.Buffers.MemoryBuffer' from assembly 'Reloaded.Memory.Buffers, Version=3.0.6.0, Culture=neutral, PublicKeyToken=null'.
at Reloaded.Hooks.X86.Wrapper.Create[TFunction](UIntPtr functionAddress, IFunctionAttribute fromConvention, IFunctionAttribute toConvention)
at Reloaded.Hooks.X86.ReverseWrapper1.Create(ReverseWrapper1 reverseFunctionWrapper, UIntPtr functionPtr)
at Reloaded.Hooks.X86.ReverseWrapper1..ctor(TFunction function) at Reloaded.Hooks.Hook1.CreateReverseWrapper(TFunction function)
at Reloaded.Hooks.ReloadedHooks.CreateHook[TFunction](TFunction function, Int64 functionAddress, Int32 minHookLength)
at Reloaded.Hooks.ReloadedHooks.CreateHook[TFunction](TFunction function, Int64 functionAddress)****

Activity

  1. Shadowfita commented on Jun 7, 2025

    @Shadowfita

    Im getting the same issue. Did you figure it out?

  2. Shadowfita commented on Jun 7, 2025

    @Shadowfita

    I ended up getting this working by rolling back to buffers version 2.0.0, but that then required me to enable pre-release versions and install assembler 1.4-mem2.0 or something. Now im getting this error when trying to hook a function:

    System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'

    Really not having much luck. I was very excited by how simple this library looked like it would be to use.

  3. marchc1 commented on Sep 22, 2026

    @marchc1

    @xxbeefydjxx @Shadowfita I managed to get Buffers to 3.0.1 and Assembler to 1.0.16 with some intermediary wrappers, if it would help you guys out ~a year later https://github.com/marchc1/Reloaded.Hooks.

    I'm really not sure why this project hasn't been updated properly, since you cannot even use SigScan + Hooks together due to this type error (which is what I was trying to do). I also was very excited by this library, since it seemed like a godsend and would provide Linux support for what I was previously doing with a bunch of Windows hell-code. So hopefully this library hasn't been forgotten and @Sewer56 does have a (proper) migration to the newer libraries planned...

  4. Sewer56 commented on Sep 22, 2026

    @Sewer56
    Member

    The answer is that I'm just eternally overworked; 60+h a week average of coding:

    Image

    (3 years in a row now...)

    So much so, I've even had to take better care of myself; since I've accrued some health issues middle of the year.
    Including Type 2 Diabetes, for instance.

    I was hoping to get back to finishing the Rust rewrite by the end of the year, but it may be another one; at this point.

    Originally I planned to get back to this after finishing the Texture Compression Suite; and Archive Format for Reloaded3.

    But this year I somehow ended up writing my own LLM harness for CI use for the first half (because everything out there is 500+MB of bloat; unsuitable for embedded); followed by a month break due to health issues; and now I'm helping a friend with a project slated for November.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions