Riverside.Win32 1.2.260408

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

Riverside.Win32


This library offers static generations of P/Invoke for all languages using custom MSBuild tasks to build CsWin32 generations from metadata. This 'aggregate' package contains all the Win32 P/Invoke methods and supporting types generated from the Win32 metadata repo.

You can use this library in any .NET language, including C#, Visual Basic, F#, IronPython, C++/CLI and others. This library is the successor to the PInvoke.NET project, enabling you to use Win32 P/Invoke in any .NET language.


The best way to consume Win32 P/Invoke APIs via this collection of libraries is by using the built-in alias system. Since all P/Invoke APIs across all packages generate into the same Windows.Win32.PInvoke class, you must use the correct alias to reference the correct version of the PInvoke class to call the P/Invoke APIs for that API set (DLL). For example, the following extract performs the SetPixel function from gdi32.dll:

extern alias gdi32; // important: you must reference the appropriate alias for the API you are calling

gdi32::Windows.Win32.Graphics.Gdi.HDC context = new(nint.Zero); // the hdc (device context) parameter in SetPixel
int x = 1; // the x coordinate parameter in SetPixel
int y = 1; // the y coordinate parameter in SetPixel
gdi32::Windows.Win32.Foundation.COLORREF white = new(0x00FFFFFF); // the colour parameter in SetPixel

gdi32::Windows.Win32.Foundation.COLORREF pixel = gdi32::Windows.Win32.PInvoke(context, x, y, white);

In practice, you might prefer to use a nicer, using statement, rather than repeating the alias throughout the document:

extern alias gdi32;

using gdi32::Windows.Win32;

// Then you can reference the P/Invoke APIs like so:
PInvoke.SetPixel();

Or, optionally, if you need access to P/Invoke APIs from multiple Win32 API sets but want to keep your codebase clean:

extern alias gdi32;
extern alias advapi32;

using GraphicsPInvoke = gdi32::Windows.Win32.PInvoke;
using AdvancedPInvoke = advapi32::Windows.Win32.PInvoke;

GraphicsPInvoke.SetPixel();
AdvancedPInvoke.CreateService();

Learn more about the "Win32 P/Invoke bindings for .NET Standard" project on GitHub.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

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.2.260408 180 4/8/2026
1.1.250615 497 6/15/2025
1.1.250608 440 6/8/2025
1.1.250601 426 6/1/2025
1.1.250525 434 5/25/2025
1.1.250518 399 5/18/2025
1.1.250511 473 5/11/2025
1.1.250504 410 5/4/2025
1.1.250427 419 4/27/2025
1.1.250420 470 4/20/2025
1.1.250413 454 4/13/2025
1.1.250410 483 4/10/2025
1.0.250409 529 4/9/2025