Question

From what I understand, using Wiki and this question I posted, Microsoft has its own compiler called VC++ which is included in the .net framework along with many other things. And it can make very good applications, due to the following reasons (among others):

  1. We can use a very good and extensive libray in it called the Base CLass Library
  2. When compiled, it produces a platform independent portable intermediate code called bytecode (also known as Common Intermediate Language). This CIL is a Microsoft implementation of the Common Language Infrastructure specification (CLI).
  3. Among other types, we can make Win32 applications which are called so, as they are made of 32 bit memory addresses. Also, win32 prog. include programming with all kinds of gui elements.

Am I right? Now, my questions

  1. What is the realtionship between mfc and bcl.
  2. What is the relationship between cts and cil.
  3. Does the definition of Win32 programming focus more on applications having 32 bit addresses" and less on "apps including gui elements" or is it vice versa?
Was it helpful?

Solution

First of all, one of the main differences between programming with the BCL and Win32 is that the BCL is used for managed code (for the CLR) and Win32 is used for native code. Using C++/CLI, you can write code of both kinds.

  1. MFC is Microsoft Foundation Classes, it basically wraps the Windows API into an object-oriented Framework. It is usually used by native C++.
    The BCL (Base Class Library) is similar in that it is also a collection of classes for common usage, but it is designed for usage by CLR Languages, such as C#, VB.Net or C++/CLI. So the two are not really related, they serve a similar purpose, but they are designed for different platforms.

  2. The CTS (Common Type System) is all about type definitions, type safety and how values are represented.
    CIL is the Common Intermediate Language, so every type you define in any language will be compiled into CIL code, which must comply with the rules defined by the CTS. This ensures other CLR Languages can use that type no matter which language was used to create it.

  3. The name Win32 these days doesn't really say anything about the number of Bits. Its roots are in 16-Bit windows and it also supports 64-Bit windows. So it's an old name, that is still in widespread use. You can also call it "Windows API". To address your question, it focuses on neither. As the name says, it is just a native API for applications running on windows. You can create GUI Elements, access system resources and features and much more. A Windows application doesn't need to have GUI Elements.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top