Additional.NET-Windows.API 1.0.0

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

Why is there Windows.API as Nuget package?

Windows.API was originally part of another framework, but after making minor adjustments, I was able to remove all dependencies. And that's when I had the idea to make it available as a Nuget package.

What is Windows.API

Windows.API is a C# .NET wrapper for native Windows API functions.

Namespace overview

Windows.API

The root namespace (Windows.API) contains static classes with the respective functions for the respective Windows DLLs. In individual cases, a function may have overloads if, for example, it can be called with different parameter types.

Windows.API.Constants

The Windows.API.Constants namespace defines a manageable set of constants in a single class that are required for some of the functions, mainly those used to control Windows services.

Windows.API.Enumerations

The Windows.API.Enumerations namespace contains individual files for each enumeration group. The best known of these is probably WindowsMessage, which contains the values for the individual Windows messages.

Windows.API.Structures

The Windows.API.Structures namespace contains class and structure definitions that are required for exchanging more complex data structures via Windows functions.

Windows.API.Helper

The Windows.API.Helper namespace contains classes that are used to control more complex processes via the Windows API, such as system-wide mouse or keyboard hooks, (un)installation of Windows services, or monitoring for new or changed windows.

Windows.API.Exceptions

The Windows.API.Exceptions namespace contains the extended exception classes for the above-mentioned helper classes.

Examples of use

Keyboard

Check, if control key is pressed

Windows.Api.Helper.Keyboard.Instance.IsKeyPressed(Windows.Api.Enumerations.VirtualKeyStates.Control)

Mouse

Get mouse button states

Windows.Api.Helper.Mouse.Instance.GetMouseButtonState()

NotifyIcon

Comming soon

Windows

Inform on new or changed windows

var listener = new WindowsEventListener(); listener.WindowChanged += WindowChangedHandler;

private void WindowChangedHandler(object sender, WindowsEventArgs e) { if (e is WindowsExEventArgs exEventArgs) Console.WriteLine("New active window has title " + exEventArgs.Title); else Console.WriteLine("New active window has id " + e.HWnd); }

More coming soon

Product Compatible and additional computed target framework versions.
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.6.1

    • 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.0 200 9/25/2025