News for hackers. Stuff that matters.
Re:Windows 10 Technical Preview Source Tree by DominikD on Thursday December 25, 2014 @10:16AM (#8796380)
This doesn't look entirely accurate. My guess is that extensions were guessed when parsing symbols (which seem to be the source of this data). I'd bet that all of the things in minwin/kernel/io are pure C with upper layers being half-in-half C and C++ (most COM stuff has to be OO).
Re:Windows 10 Technical Preview Source Tree by asveikau on Thursday December 25, 2014 @12:01PM (#8796622)
I was at microsoft from 2008-2011 and definitely saw some C++ in the kernel, even one driver using operator new for its allocations which I thought was a little nuts at the time. I also personally introduced some user mode .c files, it was just my preference. I don't think there's much rhyme or reason to which is used, although MS does lean very heavily towards C++ over C, seems like more and more as time goes on.

As for this directory tree... I found it creepy, like maybe source was leaked. The only inaccuracies I found relative to my memory of parts that I worked on was (1) I don't think they have done well tracking files that are part of static libraries and (2) what I presume are new files introduced by folks who came after me.

Re:Windows 10 Technical Preview Source Tree by aionescu on Wednesday December 31, 2014 @04:19PM (#8821136)
Indeed, static libs caused massive duplication and not-always-correct source location in my script. Nice catch :)
Re:Windows 10 Technical Preview Source Tree by DominikD on Thursday December 25, 2014 @12:07PM (#8796635)
C++ code in kernel typically wouldn't fly for the new stuff, but I bet there were some legacy pieces, sure. But even then nothrow would be forced on new and prefast/prefix warnings around failed allocations would have to be handled.
Re:Windows 10 Technical Preview Source Tree by asveikau on Thursday December 25, 2014 @12:14PM (#8796650)
This is true. The driver I am thinking of didn't use C++ exceptions. I just found it weird not to use the pool APIs like everything else.

But speaking of exceptions the kernel did use a lot of SEH.

Re:Windows 10 Technical Preview Source Tree by yuhong on Thursday December 25, 2014 @03:54PM (#8797178)
I think the VC11 compiler adds official support with a /kernel switch.
Re:Windows 10 Technical Preview Source Tree by thibauts on Thursday December 25, 2014 @10:48AM (#8796445)
AFAIR Windows is full-C and COM doesn't rely on C++ object semantics.
Re:Windows 10 Technical Preview Source Tree by DominikD on Thursday December 25, 2014 @11:25AM (#8796523)
I'm not sure what you mean by "C++ object semantics" but COM objects are just objects, that I'm positive. My code was in .cpp file, not .c - that I'm sure of as well. This is why I'm saying that extensions seem to be guesses - PDBs carry module names w/o extensions.
Re:Windows 10 Technical Preview Source Tree by asveikau on Thursday December 25, 2014 @02:21PM (#8796931)
Nothing stops you from following the COM ABI from C or any other language, which is kind of the point. The .h files generated from the idl have that CINTERFACE macro which has the vtable structs, in a form convenient for consuming from a C (and not C++) program.
Re:Windows 10 Technical Preview Source Tree by DominikD on Thursday December 25, 2014 @08:03PM (#8797647)
Sure it's doable. I wrote some DirectX apps in pure C back in the days. Heck, I wrote one in ASM. But it's art for art's sake. There's no point in complicating your life like that, especially not when you're working on a commercial project.