views:

181

answers:

3

Does anyone know of a .NET managed wrapper around Windows API functionality that is not available in the .NET framework itself?

Areas such as window creation and display styles, common UI control manipulation, keyboard/mouse input, file and disk information, memory mapped files etc

I have been a regular to visitor http://www.pinvoke.net/ and find it a great resource. However having to directly use DllImport of functions and then locate the required structures and enumerations every time is slow and prone to error.

(I do realize doing things in 100% managed code where possible is almost always the better approach, but there are many things, particularly in Windows Forms where you just can't do it using managed code only.)

Focusing on Windows XP for now, but possibly moving to Windows 7 in the future.

+4  A: 

For Windows 7/Vista, Microsoft has released a Windows® API Code Pack:

Windows® API Code Pack for Microsoft® .NET Framework provides a source code library that can be used to access some features of Windows 7 and Windows Vista from managed code. These Windows features are not available to developers today in the .NET Framework.

Anton Gogolev
A: 

Managed Windows API is a good wrapper for some of the functionality. It is open source so you can extend it.

Yuriy Faktorovich
+3  A: 

A project on SourceForge called Managed Windows API looks like it might provide the required functionality.

It appears to not have been updated for a year or so but still looks quite promising. Some wrapped WinAPI functionality include:

  • General Window settings.
  • ListView and TreeView controls.
  • Sounds and Audio.
  • Accessibility.
  • Keyboard and Mouse Input.
  • Low level system hooks.

Here's the on-line documentation.

Ash