3 Replies - 1024 Views - Last Post: 31 August 2012 - 06:59 AM

#1 Michael26  Icon User is offline

  • DIC-head, major DIC-head
  • member icon

Reputation: 362
  • View blog
  • Posts: 1,534
  • Joined: 08-April 09

.NET vs Win32

Posted 31 August 2012 - 05:13 AM

Tell me some of the main differences between .NET and Win32(aka pre .NET).
As far as i understand Win98 programs were build under Win32 and WinXP started using .NET, so i was wondering what are some differences between them.
Is This A Good Question/Topic? 0
  • +

Replies To: .NET vs Win32

#2 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1004
  • View blog
  • Posts: 3,562
  • Joined: 05-June 09

Re: .NET vs Win32

Posted 31 August 2012 - 05:22 AM

No, .NET itself (the CLR host, generally explorer.exe for 99% of users) is still a Win32 program.

Your .NET programs then run on top of said CLR.

Windows XP didn't actually ship with .NET, so that's definitely not a .NET based platform. Nothing is, really, apart from Windows 8 to an extent, where it's all WinRT-ified for the Metro-interface.
Was This Post Helpful? 0
  • +
  • -

#3 Michael26  Icon User is offline

  • DIC-head, major DIC-head
  • member icon

Reputation: 362
  • View blog
  • Posts: 1,534
  • Joined: 08-April 09

Re: .NET vs Win32

Posted 31 August 2012 - 05:25 AM

So it is like another abstract layer built on top of the existing one?
Was This Post Helpful? 0
  • +
  • -

#4 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1004
  • View blog
  • Posts: 3,562
  • Joined: 05-June 09

Re: .NET vs Win32

Posted 31 August 2012 - 06:59 AM

Well if we're going to get specific, Win32 itself refers to the Windows-provided API to it's operating system, so all the pretty headers such as windows.h, kernel.h, advapi32.lib and whatever the hell else.

A typical "Win32 Executable" is just compiled machine code running on your system, using the Win32 APIs to perhaps draw such things as Windows within the Windows Desktop Environment. It's not a platform per se.

In contrast to that, .NET is a whole runtime environment. Your .NET Executable is not actually machine code as such, but instead is IL, which can in-turn be interpreted as machine code for execution by .NET's CLR. So, in essence, your application runs "on top of" the CLR, if it's a .NET executable, as opposed to running on its own as a "Win32 Executable" would.

I mentioned above about a CLR host, and that explorer.exe is one of them. Let me explain a bit further, any application can become such a CLR host, hosting a CLR assembly and making it run. explorer.exe is essentially the "desktop process", and so is always around (and if it's not it will be in a few seconds!), meaning that your applications will be hosted within it.

Don't take all of this as gospel, the whole thing is just so much more involved than what I can explain in a quick post on my lunch at work. But needless to say, Win32 is not a platform but an API to interact with the Windows platform, and .NET is a separate runtime area.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1