I see DllImport everywhere. I see everybody declaring Win API methods in their projects. Why doesn't people put every Win API method declaration in a .NET library and use it instead?
Is there any such library? Is it open source?
-
1Some of the Windows 7 APIs have made it into .NET 4, readily available to WPF developers.BoltClock– BoltClock2011-02-28 19:35:37 +00:00Commented Feb 28, 2011 at 19:35
-
I'm building a library like this as we speak...It's a long job!Matthew Layton– Matthew Layton2012-10-10 10:59:31 +00:00Commented Oct 10, 2012 at 10:59
Add a comment
|
2 Answers
Because this would be a huge library, and no one needs to call all of the Win API methods.
The closest thing that I know of is pinvoke.net.
Many specific APIs have .NET wrappers, if you look around (ESENT, IIS management, SQL management and more).
2 Comments
Mark Sowul
See also the PInvoke Signature Generator tool: stackoverflow.com/questions/5122410/…
Jader Dias
NET is a huge library. I doubt it would increase much in size if it included those wrappers.
The WindowsAPICodePack comes close for many things.
1 Comment
BoltClock
+1 Although specifically that's many of the new Windows 7/Vista features.