KNSoft.Wintexports 1.0.12-alpha

This is a prerelease version of KNSoft.Wintexports.
dotnet add package KNSoft.Wintexports --version 1.0.12-alpha                
NuGet\Install-Package KNSoft.Wintexports -Version 1.0.12-alpha                
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="KNSoft.Wintexports" Version="1.0.12-alpha" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add KNSoft.Wintexports --version 1.0.12-alpha                
#r "nuget: KNSoft.Wintexports, 1.0.12-alpha"                
#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.
// Install KNSoft.Wintexports as a Cake Addin
#addin nuget:?package=KNSoft.Wintexports&version=1.0.12-alpha&prerelease

// Install KNSoft.Wintexports as a Cake Tool
#tool nuget:?package=KNSoft.Wintexports&version=1.0.12-alpha&prerelease                

Wintexports

Wintexports (Windows INTernal EXPORTS) exposes Windows NT low-level definitions and symbols for user-mode programming, and also supplement a few CRT functions to allow program depends ntdll.dll only.

  • Low-level definitions (i.e. NT*/Zw*, Rtl*, Ldr*, PEB, TEB, KUSER_SHARED_DATA, ...)
  • Missing symbols in Lib (i.e. ntdll.dll!MD5Init, KERNEL32.dll!CreateProcessInternalW, SECHOST.dll!LsaLookupTranslateSids, ...)
  • CRT functions or symbols (i.e. GS, RTC, malloc, free, ...)

Install and usage

General usage

  1. Install Wintexports nuget package or add Wintexports headers (required) and libs (optional) to your project.

  2. Include Wintexports header (Wintexports/Wintexports.h) instead of Windows.h in the source which you want to access low-level features.

    #include <Wintexports/Wintexports.h>
    
  3. Then you can access all the low-level features supplemented by Wintexports.

    HANDLE CsrPid = CsrGetProcessId();
    

Advanced usage: Strip Microsoft C Runtime to make program depends Ntdll only

  1. Set "Omit Default Library Name" (/Zl) in compiler setting, then MSVCRT will not be linked by default.

  2. Link Wintexports CRT instead if /Zl switch is on.

    #if defined(_VC_NODEFAULTLIB)
    #pragma comment(lib, "WIE_CRT.lib")
    #endif
    
  3. If Wintexports CRT (depends on Ntdll only) supplemented all missing symbols after stripping MSVCRT, the build will success and program will works well.

Advanced usage: Get more system Dll exports

Link following libs Wintexports supplemented:

  • Ntdll_Hash.lib: Hash functions in ntdll, i.e. (A_SHA/MD5/MD4)(Init/Update/Final).
  • WIE_WinAPI.lib: Windows SDK missing API, i.e. KERNEL32.dll!CreateProcessInternalW, SECHOST.dll!LsaLookupTranslateSids, ...

Requires Visual Studio 2019 and above with corresponding SDK, support x64/x86/ARM64 platform targets.

Project Wintexports in solution is a demo, accesses low-level system calls and functions, depends Ntdll only.

Caution

In alpha stage, do not use on production environment.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has 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
1.0.12-alpha 156 1/21/2024
1.0.11-alpha 66 1/16/2024
1.0.10-alpha 83 1/7/2024
1.0.9-alpha 76 1/4/2024
1.0.8-alpha 132 12/27/2023
1.0.7-alpha 73 12/26/2023
1.0.6-alpha 101 12/14/2023
1.0.4-alpha 115 11/28/2023
1.0.3-alpha 138 10/30/2023
1.0.2-alpha 86 10/16/2023
1.0.1-alpha 97 9/26/2023
1.0.0-alpha 182 9/5/2023