Why Microsoft not provide for C# a static Win32 class with the most native functions and structures
- by Oleg
Everybody who used P/Invoke of Windows API knows a long list of declarations of static functions with attributes like
[DllImport ("kernel32.dll", SetLastError = true, CharSet = CharSet.Auto)]
The declaration of structures copied from Windows headers like WinNT.h or from web sites like www.pinvoke.net take also a lot of place in our programs.
Why we all have to spend our time for this? Why Microsoft not give us a simple way to include a line like in old unmanaged programs
#include <windows.h>
and we would be have access to a static class Native with all or the most Windows functions and structures inside?