Giter VIP home page Giter VIP logo

winterop's Introduction

WInterop

Managed wrappers for Windows APIs

What it is

A set of .NET 6.0 libraries light-weight wrapper methods for Windows APIs.

  • WInterop.Desktop.dll (Windows platform APIs (Win32, NT))
  • WInterop.GdiPlus.dll (GDI+ APIs)
  • WInterop.Direct2d.dll (Direct2d, DirectWrite)

It is expected to be practically useful both as a component and as a place to document how to utilize various Windows technologies. Initially this was a repository of P/Invokes as well, but now there are automatically generated low-level wrappers that make this repetitive. This library uses TerraFX as the P/Invoke / COM function pointer layer.

WInterop is in an early stage of development. As it expands expect breaking changes. Contributions and feedback are welcome.

If using Visual Studio you'll need 17.0 or later as this library targets .NET 6.0.

Goals

  • Provide wrappers that provide a more managed friendly front-end for Windows APIs
  • Document how to invoke specific APIs with the ability to test
  • Provide utility code that makes it easier to write your own wrappers
  • Make it easy to find implemented wrappers

Thinking

The key concept driving this repo is "how can I program Win32 apps in a C# style?".

Windows Forms is great, but carries significant weight. This is primarily from its API being developed over 25 years ago. It didn't have access to modern C#/.NET concepts (including generics), depended on GDI+, and had to support Windows 98. The public model for Windows Forms starts at Control, which is a massive, complicated base class for interacting with Windows.

The idea in this repo is to allow you to both program directly to Win32 in a C# manner (see HelloWin) and also provide progressive layers of helper functionality to take drudgery away (see Windows101). The top "WinForms-like" layer can be seen in the Controls sample.

Note that the API here is very much in flux, more so as you move up in layers. Part of the goals is to drive the API design by scaling up functionality and writing sample apps.

winterop's People

Contributors

jeremykuhne avatar tofudebeast avatar russkie avatar adamsitnik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.