Libmem.NET 2.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Libmem.NET --version 2.1.1
                    
NuGet\Install-Package Libmem.NET -Version 2.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Libmem.NET" Version="2.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Libmem.NET" Version="2.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Libmem.NET" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Libmem.NET --version 2.1.1
                    
#r "nuget: Libmem.NET, 2.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Libmem.NET@2.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Libmem.NET&version=2.1.1
                    
Install as a Cake Addin
#tool nuget:?package=Libmem.NET&version=2.1.1
                    
Install as a Cake Tool

Libmem.NET

English | 简体中文

Libmem.NET is a Windows-focused C++/CLI wrapper for rdbo/libmem, providing managed APIs for process, thread, module, memory, scanning, symbols, assembly/disassembly, hooks, VMT, and DLL injection.

Current official support: Windows x64 + .NET 8.

Installation

dotnet add package Libmem.NET --version 2.1.1

2.1.1 is the current maintenance package line for the Libmem.NET identity and preserves the 2.1.0 Public API.

Highlights

  • Process and thread inspection
  • Module enumeration and management
  • Memory read/write/protect/allocate/free
  • Deep pointer and signature/pattern scanning
  • Symbol enumeration, lookup, and demangling
  • Assembly/disassembly helpers
  • Native hooks and VMT hooks
  • DLL injection
  • Explicit managed ownership with IDisposable
  • Native failure mapping through LibmemException

Quick start

using Libmem.NET;
using NativeApi = global::Libmem.NET.Libmem;

var process = NativeApi.CurrentProcess()
    ?? throw new InvalidOperationException("Current process not found.");

using var session = ProcessSession.Open(process)
    ?? throw new InvalidOperationException("Failed to open process session.");

Console.WriteLine(
    $"{session.Name} PID={session.Pid} Arch={session.Architecture} Bits={session.Bits}");

foreach (var module in session.Modules.Enumerate())
{
    Console.WriteLine(
        $"{module.Name} Base=0x{module.Base:X} Size=0x{module.Size:X}");
}

Runtime requirements

The package is currently intended for:

  • Windows x64
  • .NET 8
  • C# / .NET consumers

The package carries the managed assembly and the required Windows x64 native runtime assets.

x86 source/build configuration may exist in the repository, but x86 is not part of the current official NuGet support scope.

2.0 migration note

2.0.0 is the first stable release under the Libmem.NET identity. The breaking identity migration was introduced and validated in 2.0.0-preview.1.

Existing v1.0.0 consumers must update assembly references, namespaces, paths, and any reflection strings that use the old identity, then rebuild their applications. Renaming the old DLL is not sufficient.

See the full migration guide.

Documentation

License

Libmem.NET is licensed under GNU AGPL-3.0-only.

Third-party license information is available in THIRD_PARTY_NOTICES.md.


简体中文

English | 简体中文

Libmem.NET 是一个面向 Windows 的 rdbo/libmem C++/CLI 封装,为 C# / .NET 提供进程、线程、模块、内存、扫描、符号、汇编/反汇编、Hook、VMT 与 DLL 注入等托管 API。

当前正式支持范围:Windows x64 + .NET 8。

安装

dotnet add package Libmem.NET --version 2.1.1

2.1.1 是 Libmem.NET 当前维护修复包版本,并保持与 2.1.0 Public API 兼容。

主要功能

  • 进程与线程查询
  • 模块枚举与管理
  • 内存读写、保护、分配与释放
  • Deep Pointer、特征码与模式扫描
  • 符号枚举、查找与 demangle
  • 汇编与反汇编辅助
  • Native Hook 与 VMT Hook
  • DLL 注入
  • 基于 IDisposable 的明确资源生命周期
  • 通过 LibmemException 映射明确的原生失败

快速开始

using Libmem.NET;
using NativeApi = global::Libmem.NET.Libmem;

var process = NativeApi.CurrentProcess()
    ?? throw new InvalidOperationException("Current process not found.");

using var session = ProcessSession.Open(process)
    ?? throw new InvalidOperationException("Failed to open process session.");

Console.WriteLine(
    $"{session.Name} PID={session.Pid} Arch={session.Architecture} Bits={session.Bits}");

foreach (var module in session.Modules.Enumerate())
{
    Console.WriteLine(
        $"{module.Name} Base=0x{module.Base:X} Size=0x{module.Size:X}");
}

运行环境

当前 NuGet 包正式面向:

  • Windows x64
  • .NET 8
  • C# / .NET 消费者

包内包含托管程序集以及 Windows x64 所需的原生运行时文件。

仓库中可能仍保留 x86 源码或构建配置,但 x86 当前不属于 NuGet 正式支持范围。

2.0 迁移说明

2.0.0 是 Libmem.NET 新身份下的首个稳定版本;这次破坏兼容性的身份迁移已在 2.0.0-preview.1 中引入并完成验证。

现有 v1.0.0 使用者需要更新程序集引用、命名空间、路径以及使用旧身份的反射字符串,并重新编译应用。仅重命名旧 DLL 无法完成迁移。

完整说明见 迁移指南。

文档

许可证

Libmem.NET 使用 GNU AGPL-3.0-only 许可证。

第三方组件与许可信息见 THIRD_PARTY_NOTICES.md。

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.5.0 95 10/10/2026
2.4.1 99 10/9/2026
2.4.0 89 10/8/2026
2.3.0 99 10/8/2026
2.2.1 93 10/8/2026
2.2.0 96 10/7/2026
2.1.1 98 10/7/2026
2.1.0 96 10/7/2026
2.0.0 96 10/5/2026
2.0.0-preview.1 62 10/5/2026

English: Libmem.NET 2.1.1 is a backward-compatible maintenance release. Bug fixes: reject the libmem bad-address sentinel before VmtManager creates native VMT state; preserve VTable page protection when Unhook is called for an untracked index; add regression coverage for invalid VTable addresses and VMT lifecycle/protection contracts; improve NuGet publication and post-release smoke-test coverage. Compatibility: no intentional Public API changes from 2.1.0; the pinned rdbo/libmem revision is unchanged; the official target remains Windows x64 / .NET 8. 中文:Libmem.NET 2.1.1 是向后兼容的维护修复版本。Bug 修复:在 VmtManager 创建 native VMT 状态前拒绝 libmem bad-address sentinel;修复对未跟踪 index 调用 Unhook 时可能改变 VTable 页保护的问题;补充无效 VTable 地址及 VMT 生命周期/页保护回归测试;完善 NuGet 发布与发布后 smoke test 覆盖。兼容性:相比 2.1.0 不主动引入 Public API 变更;固定的 rdbo/libmem 版本不变;正式支持目标仍为 Windows x64 / .NET 8。 Full notes / 完整说明: https://github.com/CardResearchLab/Libmem.NET/blob/main/CHANGELOG.md