Musa.CoreLite 1.0.4

Requires NuGet 2.5 or higher.

dotnet add package Musa.CoreLite --version 1.0.4
                    
NuGet\Install-Package Musa.CoreLite -Version 1.0.4
                    
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="Musa.CoreLite" Version="1.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Musa.CoreLite" Version="1.0.4" />
                    
Directory.Packages.props
<PackageReference Include="Musa.CoreLite" />
                    
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 Musa.CoreLite --version 1.0.4
                    
#r "nuget: Musa.CoreLite, 1.0.4"
                    
#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 Musa.CoreLite@1.0.4
                    
#: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=Musa.CoreLite&version=1.0.4
                    
Install as a Cake Addin
#tool nuget:?package=Musa.CoreLite&version=1.0.4
                    
Install as a Cake Tool

Musa.CoreLite

Actions Status Downloads LICENSE Visual Studio Windows Platform

Musa.CoreLite is a lightweight core library extracted from the Musa.Core project, providing complete support for calling all Zw* system routines for Windows developers.

This project aims to solve the problem of incomplete export symbols for Zw* system routines, allowing developers to directly call all Zw* system routines in both user mode and kernel mode without worrying about missing symbols.

Usage

Right-click your project, select "Manage NuGet Packages", search for Musa.CoreLite, choose the appropriate version, and click "Install".

The NuGet package depends on Musa.Veil. You can directly include <Veil.h>

Header-only Mode

Add the following code to your .vcxproj file. In this mode, the lib file will not be automatically linked.

  <PropertyGroup>
    <MusaCoreOnlyHeader>true</MusaCoreOnlyHeader>
  </PropertyGroup>

Code Example

https://github.com/MiroKaku/Musa.CoreLite/blob/main/Musa.CoreLite.TestForDriver/Musa.CoreLite.TestForDriver.cpp?plain=1

EXTERN_C NTSTATUS DriverEntry(
    _In_ PDRIVER_OBJECT  DriverObject,
    _In_ PUNICODE_STRING RegistryPath
)
{
    PAGED_CODE();
    UNREFERENCED_PARAMETER(DriverObject);
    UNREFERENCED_PARAMETER(RegistryPath);
    NTSTATUS Status;
    do {
        DriverObject->DriverUnload = Main::DriverUnload;

        Status = MusaCoreLiteStartup();
        if (!NT_SUCCESS(Status)) {
            MusaLOG("Failed to initialize MusaCoreLite, 0x%08lX", Status);
            break;
        }
        MusaLOG("Test ZwGetCurrentProcessorNumber() return %lu",
            ZwGetCurrentProcessorNumber());
    } while (false);
    if (!NT_SUCCESS(Status)) {
        Main::DriverUnload(DriverObject);
    }
    return Status;
}

License

This project is licensed under the MIT License. See LICENSE for details.

Contributing

Contributions are welcome! Please read the Code of Conduct before submitting issues or pull requests.

Acknowledgements

  • Thanks: The implementation was provided by @xiaobfly.
Product Compatible and additional computed target framework versions.
native native is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Musa.CoreLite:

Package Downloads
Musa.Core

Musa.Core - 用 ntdll/ntoskrnl 实现 Kernel32、Advapi32 等API。 * 它包括用户模式和内核模式两种。 Musa.Core - Use ntdll/ntoskrnl to implement Kernel32, Advapi32 and other APIs. * It includes user-mode and kernel-mode.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.4 180 8/26/2025
1.0.3 214 8/26/2025
1.0.1 218 5/25/2025
1.0.0 112 5/10/2025

Feat: RuntimeLibrary.MT support