• 0

What Language Is Windows Written In?


Question

Recommended Posts

  • 0
I could've sworn ONE part of Windows is actually written in VB... or at least it looks that way.

Go to the directory %systemroot%\fonts and click File > Install New Font... that dialog looks so old, no?

:D yeah, that looks really old but minesweeper, solitaire, calc and some other apps where not (or only slightly) updated from windows 3.1 as well.... so I think thats only some C code that did not get looked over for more than 10 years ;)

:o Windows is no so big they even don't seem to have the time to polish the whole interface for the new versions.

  • 0

If i had to hazard a guess I'd say the old-looking dialogs have something to do with being built against an old version of comdlg. If they used something like version 3 they would have that appearence. Once Microsoft had the font installer working in NT4/95a there really wasn't any reason to update it so they probably didn't waste their time when so many other things needed the attention of their developers.

If you compiled in the vb5 runtime library you're looking at having 10mb executables (vbrun500.dll is 5.5MB when .zip compressed). If microsoft has a lot of .exe files in that range I might believe they were using vb, but last check they had nothing in that range. Besides, if more than one application was written in VB they'd be wasting 10mb per application, not such a good idea.

I do notice a few of the default "mfc" application icons in the windows and system directory though...

  • 0

Well..i hate to burst ur bubble..but YES some apps in Windows EVEN XP are written in VISUAL BASIC. Like notepad, paint, character map, and even calculator. these were the first few apps ever. that were originally in Windows 1.0 and were written in Asm, but then when windows got a better gui, and came up with VB, then they took then into the next level. i guess they figure that those programs are good enough the way they are and whats the point in upgrading their code if they work fine in that languge.

  • 0
Well..i hate to burst ur bubble..but YES some apps in Windows EVEN XP are written in VISUAL BASIC. Like notepad, paint, character map, and even calculator.

Um what makes you think that? Those apps would have been trivial to write in C++ or something similar since they're such simple programs. I'd highly doubt they're written in VB.

  • 0
Well..i hate to burst ur bubble..but YES some apps in Windows EVEN XP are written in VISUAL BASIC. Like notepad, paint, character map, and even calculator. these were the first few apps ever. that were originally in Windows 1.0 and were written in Asm, but then when windows got a better gui, and came up with VB, then they took then into the next level. i guess they figure that those programs are good enough the way they are and whats the point in upgrading their code if they work fine in that languge.

Paint on XP is written in C++ with MFC. The others, I'm fairly sure they were written in C. The only thing on my computer I see referencing VB Runtimes is VS.NET.

Spy++ rules. :)

  • 0
Well..i hate to burst ur bubble..but YES some apps in Windows EVEN XP are written in VISUAL BASIC. Like notepad, paint, character map, and even calculator. these were the first few apps ever. that were originally in Windows 1.0 and were written in Asm, but then when windows got a better gui, and came up with VB, then they took then into the next level. i guess they figure that those programs are good enough the way they are and whats the point in upgrading their code if they work fine in that languge.

BULLSH1T ROYAL!

OMFG I swear that you're lucky that I've no special rights here, because I'd f#%&ing ban you for talking such crap!

  • 0

C# is a runtime-environment language isn't it: if so, writing an operating system would be mighty difficult. If the OS needs the runtime environment to run before it can load, but the runtime environment requires the OS to load before i can run. You'd have the chicken/egg syndrom.

A lot of OS X is written in Objective-C which does require a runtime environment, the core of the OS is still done on standard C++. It will be a very long time (or maybe never) before we see all of Windows done in C#, if not for the runtime problem then for the fact that MS has so much invested in their existing 100,000,000 lines of code that re-writting it all would offer very little return (people are still buying Windows now aren't they?)

  • 0

Longhorn or future Windows' will look like this:

HAL <-> Kernel + Drivers + CLR <-> Managed APIs / Win32 <-> Applications

The core will be native code, the rest managed. Writing a major part in C# is easily doable like this. The whole new API called Avalon is almost fully managed. Win32 is still included for backwards compatibility.

  • 0

C# is capable of writing an entire OS as long the framework is there. If the framework is loaded, it can write to memory and talk to hardware. In theory, drivers and the kernel etc could be written in C#, but MS is not going to do this in Longhorn (because of time).

However, all the upper level code will be in C# (avalon), and it will use DX 9 to draw everything (GDI and GDI+will be extinct). Drawing in DX 9 will completely get rid of the performance problems of C# today on XP because GDI and GDI+ are designed for C++ and they can't talk to hardware. That's why you'll see some drawing slowness in .NET programs on XP, but if you've seen the LH alpha, you'll notice there's no drawing slowness at all with the sidebar (which is written in C# and drawn by D3D 9). The ability of C# to seamlessly talk to hardware through DX 9 is the one reason (I think) that C# will overtake Java on the desktop for user applications.

Oh, and as for the VB.net debate that it's the same speed as C# etc etc cause it goes through the CLR. Well, it's not, because C# can use pointers and talk to hardware. Remember, "unsafe" C# is still "managed." C# also has much more "flexability than C#, especially when trying to completely replace the current Win32s.

Edited by Justin03248
  • 0

I wish some of us in the community would stop talking out of our asses!

First the question is vague. Do you mean windows the CD and everything it contains, windows the OS itself or the win32 API? Windows (the CD you buy) could very well contain apps written in VB (though as Weenur pointed out, it seems unlikely since no APPS that are part of the windows distribution depend on the VB runtimes) or C# (but given C# requires .NET and Windows XP does not ship with .NET, chances are C# is not used either).

The Win32 API, and most of the system libraries that comprise the Windows OS, are written in pure C and Assembler. That is the only way to do it. For practical and performance reasons. Hell even the .NET runtimes are probably written in pure C or C++.

Also, if you know anything about programming then you can tell from how you interact with the API what language it is likely to be coded in. Any time you are passing long pointers to strings (lpstr) or Handles to Windows (HWnd) then chances are that is pure C. You never pass an "Object" in an API call. The API does not understand objects.

For all those claiming all of windows will be written in C# - get a clue! Here are three things for you to think about before spewing out more garbage:

1) When an x86 machine boots it knows nothing about C# or VB or any of that crap. It can understand microprocessor instructions and that is about it. When you install windows it installs NTLDR (IO.sys in DOS and older Win9x versions) on the root of your drive, and writes a small executable to the MBR (master boot record) that can bootstrap NTLDR. You cannot create microprocessor instructions from C# or VB or even Java for that matter. Only fully compiled languages can do that. (NOT That MS cannot change C# to make it compile directly to machine code - but that would kind of defeat its purpose wouldn't it?)

2) If you accept that the Win32 API is written in C (and therefore so are all the system Dlls that support it) do you really think it is worth the trouble to rewrite the whole thing (literally thousands of public functions and probably thousands more that are private or unpublished) just so you can say the whole OS is in C#?

3) How do you think automatic garbage collection will happen in the C# runtimes if it is all coded in C#? Besided the obvious stupidity of the statement (how can you write a language runtime in the language itself) there is a deep problem here: obviously there has to be something deallocating memory in the background - but C# does not allow you to mess with memory. No: for that you need malloc() and free().

Edited by PeterHammer
  • 0

"When an x86 machine boots it knows nothing about C# or VB or any of that crap. It can understand microprocessor instructions and that is about it."

That's why the .NET framework could be loaded and the rest of the OS could be coded in C#. It's possible for an OS to be coded in C#, the Framework just must be loaded first, which is written in native code. C# can talk to memory. However, none of this will happen in Longhorn.

However, the entire GUI of LH will be C#, using the native managed DX 9 code to draw everything and get rid of performance problems.

  • 0

PeterHammer: Read again what I said, goddamnit!

The ****ing core will be native code and mainly just consist out of kernel, drivers and the freakin' CLR. This allows the major codebase of Windows to be written in managed code very well. What do you think is MS trying to accomplish with Avalon? You get a clue instead!

  • 0

Ya, there's many different "layers" of the OS. C# is usually used as an upper layer language today (although MS could make it do more in OS's after Longhorn). That's the whole benefit of .Net. It doesn't need to get as messy as C++ so you can code more a lot faster and easier. C# just happens to be the super language that can tell the framework it wants to talk to memory/hardware in specific parts of code, so it's the best of both worlds (Java and VB.NET can't do this).

  • 0

You guys have heard of the rotor project (.Net for FreeBSD) They (MS) reckon they have all of the functionality that .Net relies on into 2 dlls and the C# compiler, everything else can be compiled from that point using the C# compiler.

Now..... we getting clearer as to the direction MS are taking? or do you want a pretty picture?

ONE!

  • 0
PeterHammer: Read again what I said, goddamnit!

The ****ing core will be native code and mainly just consist out of kernel, drivers and the freakin' CLR. This allows the major codebase of Windows to be written in managed code very well. What do you think is MS trying to accomplish with Avalon? You get a clue instead!

Chill out numbnut. I was not even talking to you. Your post appeared while I was writing. Its just all the random speculation about VB and then writing the whole OS in C# that got to me.

If you actually read what I wrote, I am just responding to those that read in some half digested news klip something about Avalon and C# and, oh, that must mean the whole OS will be written in C#. That is impossible without full compilation, and hopefully you see it that way too.

And what the hell are you being so loud about anyway. Avalon is still a pipe dream in some architect's head in Redmond and is not planned for release until what? 2005. Maybe 2006 given prior track record. How the hell are you so sure it is going to be all written in CLR languages?

OH I JUST CANNOT RESIST: according to your post the "****ing core" will "mainly just consist out of kernel, drivers and the freakin' CLR".

Wow that sounds like a pretty freaking large core to me. You are only talking about all the software responsible for hardware devices like drives, keyboards, mice, printers, display adapter, sound cards etc... (drivers), all the memory management, CPU process scheduling and process threading (kernel), and then the main API framework (CLR) of the OS too. If you boil down the definition of an OS that could be a whole OS all by itself, and then some.

And let's not forget. There is also the Win32 API - unless of course MS is going to completely throw out all caution and actually produce a version of windows that is not backward compatible with anything before it. Tell me Loud Mouth: Did you hear anything lately that indicates what direction MS will take on this?

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • The problem isn't with Epic, it's with the platform holders like Steam and Nintendo, they should be a lot more strict in their review process.
    • Hello, Installed here without issue. Regards, Aryeh Goretsky
    • Microsoft updates Visual Studio Code with easier language model discovery and in-app search by Paul Hill Microsoft has released Visual Studio Code 1.125, its latest weekly release. This week, the company has focused on discovering and installing extra language models via the Marketplace; searching the web and securely browsing over remote connections without leaving VS Code; choosing how long VS Code waits before installing extension updates; and delivering managed Copilot settings through existing device management tooling. In older versions of VS Code, extensions could contribute their own model providers, but to find these extensions, you needed the right tags to search for in the Extension view. Now, the Language Models editor gives you an Install Model Providers button that opens the Extensions view, which is filtered to extensions that contribute model providers, making it easier to find and install them. Once you install a provider, its model will appear in the model picker. If you use the integrated browser much, you can now look up information without leaving VS Code by typing a query into the integrated browser’s address bar. It will use your configured search engine, the same way a standalone browser does. You can use workbench.browser.searchEngine to pick a search engine. When the browser is opened in a remote workspace, it's now possible to proxy HTTP(S) traffic via the remote connection. This allows you to connect to any ports or services that can only be accessed from the remote machine. If you read our coverage from two weeks ago about VS Code 1.123, you might have seen that extension updates have a two-hour delay as a safety measure. In this update, Microsoft is giving you the ability to configure the time of the delay. You can find it under extensions.autoUpdateDelay. Finally, with this update, admins can deliver managed GitHub Copilot settings through native device management (MDM) channels on Windows and macOS, in addition to account-based enterprise settings files. Settings delivered via MDM appear as policy-enforced in VS Code and can’t be overridden locally. Future updates will extend the supported policy keys across Copilot surfaces. You can download the update from the Visual Studio Code website now.
    • "it opens up new doors for people who prefer using Edge, but cannot be bothered to configure a Microsoft account" You already have a Microsoft account if you are using Windows 11, because you can't set it up without one.
    • This is how much iPhone 18 Pro could cost after Apple's price hike confirmed by Hamid Ganji Image via Apple Apple CEO Tim Cook confirmed in a recent interview that the company may have to raise prices on some of its products due to the ongoing memory shortage. While he did not elaborate on the scale of the price hikes, new estimates suggest that Pro iPhone models could become significantly more expensive this fall. The Wall Street Journal and research firm TechInsights have come up with an educated estimate of how much the upcoming iPhone 18 Pro could cost after its launch in September. The estimate is based on current increases in memory and storage chip prices. For starters, the iPhone 18 Pro base model is expected to feature 12GB of RAM and 256GB of internal storage. According to TechInsights estimates, 12GB of DRAM for the iPhone 17 Pro cost Apple $39 last year. However, for the iPhone 18 Pro, the cost of the same amount of DRAM could soar to $145. Likewise, 256GB of flash storage that previously cost $13 could now cost around $51. Producing a base iPhone 17 Pro reportedly cost Apple around $582, but TechInsights estimates that the production cost of the iPhone 18 Pro could rise to $726. If Apple wants to maintain the roughly 47% profit margin it enjoys on the iPhone 17 Pro, the base price of the iPhone 18 Pro would need to reach $1,371. After standard pricing adjustments, customers could end up paying around $1,299 for the base model. However, that may not be the end of the story. As we previously reported, the iPhone 18 Pro is said to feature a variable-aperture lens, which could cost Apple at least 50% more than the current camera system. The estimated $1,299 price tag does not include the additional cost of this upgraded camera hardware. Once that expense is factored in, the base model could cost at least $1,399. A $1,399 price tag for the base iPhone 18 Pro would represent a significant increase over the current $1,099 starting price of the iPhone 17 Pro. If Apple wants to keep its upcoming iPhones competitive, it may need to accept lower profit margins.
  • Recent Achievements

    • Week One Done
      Classifyskilleducation earned a badge
      Week One Done
    • One Month Later
      eurospharma62 earned a badge
      One Month Later
    • Week One Done
      With What earned a badge
      Week One Done
    • Week One Done
      Harris Gilbert earned a badge
      Week One Done
    • One Month Later
      Vincian earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      543
    2. 2
      +Edouard
      171
    3. 3
      PsYcHoKiLLa
      84
    4. 4
      ATLien_0
      64
    5. 5
      neufuse
      64
  • Tell a friend

    Love Neowin? Tell a friend!