This is a mirror of official site: http://jasper-net.blogspot.com/

Managed Windows API

| Thursday, February 3, 2011
A collection of .NET components that wrap PInvoke calls to access native API by managed code.

What is "Managed Windows API" good for?

The Problem

If you want use Windows functionality in a .NET application which is not covered by the .NET framework (there is no "managed API" available for it), you usually have to use PInvoke, an interface that allows to invoke raw API functions from C# and VB.NET.

However, this is quite cumbersome. pinvoke.net does a great job in helping you to get the correct PInvoke declaration, but still you have to do lots of error-checking and ensure that you did not forget to handle all the corner cases. When accessing PInvoke declarations directly, this may lead to low-level code spread all over your apllication.

To avoid that, you usually write your own C# classes or .NET components to wrap all PInvoke stuff and provide the caller with a nice, high-level interface for the low-level API (that uses enums for enumerated values, reports errors by throwing exceptions, etc.)

However, if every developer does this for every API he uses, lots of time and energy is wasted for reinventing the wheel.

The solution

"Managed Windows API" is a collection of C# components that wrap Windows API functionality. It contains those features the author needed for his C# development, but if you have components yourself you want to share, please submit them so that this project can grow.

Are there example programs available?

Yes and no. You might have a look at the Managed Windows API Tools. Started as a collection of ManagedWinapi samples, the Managed Winapi tools evolved into a toolbox of lots of small but useful tools that solve their specific task well. They can still be used as reference for how to use ManagedWinapi, but their functionality may make it hard to find the relevant code parts quickly.

Read more: Managed Windows API

Posted via email from Jasper-net

10 comments:

Anonymous said...

Hi everyone, it's my first visit at this site, and paragraph is truly fruitful designed for me, keep up posting such posts.

My site - natural collagen production

Anonymous said...

I really like your chia cereal idea! I have to attempt it.


My webpage: chia Seeds Sold in bulk

Anonymous said...

Every weekend i used to pay a visit this site, as i wish for enjoyment, for the reason that this this web site conations really good funny stuff too.


Have a look at my blog :: eyelasticity

Anonymous said...

Hi I reach this website by mistake after I became looking around bing for acne point, I produce to assert
your internet site is really worthwhile I additionally really love the artwork, their amazing!
. I don't need the duration during the minute to totally look over your site but we produce bookmarked it. I am going to become in return in a day or two. thanks

my web-site - visit the following post

Anonymous said...

Great article, just what I needed.

my web page: causes of sleep disorders in adults

Anonymous said...

I do trust all of the ideas you have presented in your post.
They are really convincing and can definitely work. Nonetheless, the posts are very brief for starters.
May you please lengthen them a little from next time?
Thank you for the post.

Look at my web page - http://nam.Nu

Anonymous said...

Please let me know if you're looking for a article author for your site. You have some really great posts and I feel I would be a good asset. If you ever want to take some of the load off, I'd
absolutely love to write some content for your
blog in exchange for a link back to mine. Please send me an e-mail if interested.
Thank you!

Also visit my page - dr drum

Anonymous said...

It's great that you are getting ideas from this article as well as from our discussion made at this time.

My web site ... genf20 plus

Anonymous said...

Hello are using Wordpress for your site platform?
I'm new to the blog world but I'm trying to get started and create my own.

Do you require any html coding knowledge to make your own
blog? Any help would be greatly appreciated!

Take a look at my site: her solutions where to buy

Anonymous said...

I think this is one of the most important info for me.
And i am glad reading your article. But wanna remark on
few general things, The website style is ideal, the articles is
really excellent : D. Good job, cheers

Here is my homepage sexual favors