RE: SPAM-LOW: OT: C++ religious war (was Re: C++ and WDF)

Ray Trent writes:

And there’s certainly nothing stopping
you from implementing virtual function
tables by hand in C… Well, except for
common sense, I guess.

DriverEntry(…)
{
DriverObject->MajorFunction[IRP_MJ_CREATE] = …
DriverObject->MajorFunction[IRP_MJ_WRITE] = …

}

Sure looks like a vtable to me.

Also, COM definitely does vtables in C. Just read any of the COM header
files and you’ll see duplicate definitions for each interface: one as a C++
pure abstract class, another as a C structure pointing to a C vtable
structure.

Not that it’s pretty, of course.

– arlie