Does Windows Vista mark the end of the native Windows API?

I have been asked the same question enough times to realise that a more "public answer" would be useful. The question is roughly:

"Has Microsoft deprecated the native Windows API in Vista in favor of a Class based API?"


"Is all functionality in Windows Vista exposed through .NET Framework 3.0 and therefore I will never need to do a Pinvoke again?"

The native Windows API very much remains in Vista. Whilst .NET Framework 2.0 (VS2005) and .NET Framework 3.0 (Vista) gives a great class based interface, we recognise that a greal deal of the applications out there (including from ourselves) were built against the native APIs and will continue to use the native APIs. Infact in Vista the native APIs grow to expose new capabilities – from windows desktop search to explorer extensions to new UI elements such as TaskDialog. Some of the new functionality in Windows Vista is only exposed as native Windows APIs and managed code developers will need to use interop to gain access.

Developers should increasingly look to moving away from native APIs and towards managed code and the .NET Framework and the benefits it bring – but we will be supporting both models for a very, very long time.


Comments (4)

  1. Keeron says:

    Are there plans to have a SP / Post-Vista release of .NET framework that has these new Vista APIs in managed code?

    Using these new (Vista-specific) APIs from managed code (either wrappers or Pinvoke) is doable, but for some of these I think most people will avoid just because the work they have to do. Unless there are already wrappers for the most commonly used APIs (like Aero wizards, glass, task dialogs, UAC, etc)

    ANSWER (eric): The windows sdk does inclued managed code wrappers as samples for some of the new vista native apis – but by no means all. Sorry – I wish it was all.

  2. Philip Rieck says:

    Many of us were *hoping* that we wouldn’t need the native API in vista 🙂   (those of us at the PDC03, for example)

    As a long time C/C++ win developer who also loves .net, I have to say – the more “native” things wrapped by Windows.Forms or WPF or whatever’s next, the better…  I use the native API all the time, but only when I have to.  Using managed APIs is just so much quicker and less error prone.

    ANSWER(eric):  100% agree…managed is the way to go.

  3. Bjoern Graf says:

    The need for interop for the last required feature is something that stroke me since the first incarnation of .NET. Why is there no managed way to access all possible indeces for nFolder in SHGetSpecialFolderPath? Environment.SpecialFolder just does not define version 6 CSIDL values. And why does the ListView sport the common controls v6 features but TextBox does not support cue banners? Anyway, these are just my recent needs for interop and this should not end in a lengthy rant – after all, C++/CLI makes interop (eventually) pretty easy =]

Skip to main content