Bruno van Dooren said:
I have been wondering about this.
How can an API be a pure .NET API?
I agree that a lot of API logic can be made in managed as well as
unmanaged environment,
but sooner or later you will have to make system calls to communicate with
either device drivers or
the windows subsystem itself.
This means that you are always going to have an unmanaged core on which a
managed API is built.
correct?
--
Kind regards,
Bruno van Dooren
(e-mail address removed)
Remove only "_nos_pam"
You are correct. Ultimately you have to get down to something that runs in
machine code and can work with the underlying hardware.
There was a lot of confusion when Microsoft first started talking about
Vista having a managed API. People thought the whole OS was going to be
written in .Net (for some reason). Originally the plan was to write quite a
bit of the OS in .Net, as I understand, but that changed over time when they
realized the developers they had were more efficient coding in C++. Vista
will have both a managed and unmanaged API that developers can use. It's my
understanding that all of the newer technologies coming down the line like
WPF, WCF, etc. will have unmanaged APIs that can be accessed from C++, etc.
as well as managed APIs for .Net. It's just that these layers are being
*implemented* in .Net.
It's my understanding that what they're working towards is "universal"
access. All functions in the OS will be accessible both from native
applications (written in C/C++, etc.) and from apps. written in .Net. They
will hide the implementation using wrappers, so the programs using them
won't know any better. It'll just work.
I'm not sure how the unmanaged API will be constructed. I know for example
that when .Net 1.0 came out 4 years ago, Microsoft also released GDI+ as a
separate C++ library. As I recall it was not an add-on to MFC, since it
didn't use MFC objects, but it did use objects/object inheritance, etc. So
it wasn't a C API like Microsoft typically released in the past. GDI+ was a
new technology supported by .Net, and is supported by underlying technology
in WinXP. I don't remember if GDI+ was already supported in XP, and
programmers just downloaded the SDK for it, or whether the download was an
upgrade to XP, plus the API. Anyway, this is an example where Microsoft
released both a managed and unmanaged API that offered the same access to
functionality.
I agree with the comments made earlier. It's much easier dealing with the
..Net API than it is dealing with Win32/MFC. I am a bit surprised to hear
though that C++ projects are moving to C++/CLI. I always thought that
projects that had been written in C++ had performance as a major concern. I
know we're not supposed to talk about unpublished benchmarks, but I can say
just because C++/CLI runs through the .Net runtime that it's not going to
run as efficiently as a native C++-implemented app. I guess PCs have gotten
to the point, though, where they're speedy enough that running a managed
app. isn't a big deal.
I don't know if Microsoft will be adding access features to MFC that make it
easy to access the new feature layers. I've been out of that loop (C++) for
a while. I went to a Microsoft DevDays event back when they were talking
about .Net 1.0 and I talked to a Microsoft developer there. I was asking him
questions about if there was anything new in MFC in the new version of VS.
He didn't know and he didn't care. As far as he was concerned MFC was legacy
technology and didn't care for it. Nevertheless when VS.Net came out, they
had added some features to MFC, such as web services capability, a new
CHtmlDialog class, etc. So it's possible they'll add more.
---Mark