/kernel, which is the default for compiling drivers in WDK 8 and 8.1 does not allow the use of C++ exceptions or RTTI at compile time (as opposed to previous failures at link time due to unresolved symbols)
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@seznam.cz
Sent: Monday, November 11, 2013 11:02 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] C++ RTL for NT kernel-mode drivers
Object classes and their interfaces are very similar in 2 frameworks.
It doesn’t appear strange, because both ‘KMDF’ and ‘IOKit’ are exposes the terms for device driver developing. And in turn those terms are just dictated by the hardware architecture. Such an explanation seems to look plausible.
I remember seeing CF in the Darwin kernel/IOKit, IIRC OSDynamicCast is in CF.
Probably I’m wrong. It was like 2.5 years when I was looking at it seriously.
Oh, well, I’v just seen the xnu sources and the OSDynamicCast is defined here:
xnu-2050.22.13\libkern\libkern\c++\OSMetaClass.h
as the macros going into the internal implementation.
and as a prove that ObjC is banned from the kernel look at this stuff from xnu -)
#ifdef KERNEL
#include
#include
#else
#include
#include
#endif /* KERNEL */
and take into account that ‘CoreFoundation.h’ is a part of the user-land libs.
>also it exposes
>some kind of reflection.
>
>This is the feature which C++ lacks. And that’s why “lack of standard RTTI” is
>not a drawback. People use their own.
Yes, well, RTTI at the moment is not a popular solution. It may be useful for classes with a complex multiple and virtual inheritance but these classes in turn are difficult enough to project and they are hardly to be recommended for a all-round usage.
But by the momemt it was decided to include RTTI to the kernel RTL, almost all the necessary prerequisites had been ready - the EH-lib, the internal-compiler-data iterators lib, and the basic knowledge of how-to. Moreover MS had MSVS2012RC released at that time, where the rtti sources were included so all the unclears had been gone and the kernel rtti became ready fast enough -)
—
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
OSR is HIRING!! See http://www.osr.com/careers
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer