KNSoft.Wintexports 1.0.2-alpha

This is a prerelease version of KNSoft.Wintexports.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package KNSoft.Wintexports --version 1.0.2-alpha                
NuGet\Install-Package KNSoft.Wintexports -Version 1.0.2-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.2-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.2-alpha                
#r "nuget: KNSoft.Wintexports, 1.0.2-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.2-alpha&prerelease

// Install KNSoft.Wintexports as a Cake Tool
#tool nuget:?package=KNSoft.Wintexports&version=1.0.2-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, ...)

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 163 1/21/2024
1.0.11-alpha 71 1/16/2024
1.0.10-alpha 88 1/7/2024
1.0.9-alpha 81 1/4/2024
1.0.8-alpha 137 12/27/2023
1.0.7-alpha 80 12/26/2023
1.0.6-alpha 107 12/14/2023
1.0.4-alpha 121 11/28/2023
1.0.3-alpha 143 10/30/2023
1.0.2-alpha 92 10/16/2023
1.0.1-alpha 103 9/26/2023
1.0.0-alpha 187 9/5/2023