A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/prasannavl/WinApi below:

prasannavl/WinApi: A simple, direct, ultra-thin CLR library for high-performance Win32 Native Interop

A simple, direct, ultra-thin CLR library for high-performance Win32 Native Interop

static int Main(string[] args)
{
    using (var win = Window.Create(text: "Hello"))
    {
        win.Show();
        return new EventLoop().Run(win);
    }
}

Nuget:

Install-Package WinApi

Fully supports the CoreCLR. Uses C# 7 features like ref returns to achieve performance without losing semantic value.

TL;DR: WinForms Comparison
Direct message loop performance: 20-35% faster.
Heap allocation: 0MB vs. roughly, 0.75GB / 100k messages.
Memory page faults (Soft): 0.005% - A mere 5k vs. roughly 1 million faults/100k messages)

Note: - Starting from v4, all packages are of minimum netstandard 1.4, and Source nuget packages are no more. Desktop package is netstandard 2.0.

While there aren't many well defined reliable wrappers, there are a few - my favorite being Pinvoke (https://github.com/AArnott/pinvoke). While Goals above, should explain the reasons for re-inventing the wheel, it's also mostly a matter for coding style, and about having the ability to micro-optimize when you really need to.

--- LibraryName
    --  Types.cs (Structs, enums and other constants)
    --  Methods.cs (All direct native methods)
    --  Helpers.cs (All the helper methods with type safety wrappers)
    ##  Constants.cs (Optionally, if there are too many types, split constants (enums) from pure structs)
C/C++ Samples to serve as comparison standard: Community projects using WinApi

(This section is community editable. Please help yourself)

Thanks to JetBrains for the OSS license of Resharper Ultimate.

Proudly developed using:

This project is licensed under either of the following, at your choice:

Contribution to the LiquidState project is organized under the terms of the Contributor Covenant, and as such the maintainer @prasannavl promises to intervene to uphold that code of conduct.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4