Mark
Fri Feb 03 06:32:14 CST 2006
On Fri, 3 Feb 2006 03:19:16 -0800, mirage2k2
<mirage2k2@discussions.microsoft.com> wrote:
>Don is right, you want HtsCpp from hollistech, its a small c++ runtime
>containing implementation of new/delete, etc. and also a mechanism for
>ensuring that constructors/destructors for global classes get called. There
>is no C++ exception handling in the kernel so you have to write your C++ so
>that it does not throw any. Or if it does throw then #define a throw macro
>that generates a bugcheck (BSOD).
>
>Using HtsCpp you need to rename your DriverEntry() to CPP_DRIVER_ENTRY()
>
Just so the OP knows all the alternatives - as an alternative to my
htscpp runtime library you can define new/delete operators in your
classes and avoid global objects and then you don't actually need a
c++ runtime.
>
>"Don Burn" wrote:
>
>> The DDK compiler supports C and C++, but the kernel environment does not
>> support much C++. Take a look at
http://www.hollistech.com/ for some C++
>> support. Also, read the article at
>>
http://www.microsoft.com/whdc/driver/kernel/KMcode.mspx to understand the
>> pros and cons of using C++ in the kernel.
>>
>> Avoid DriverWorks at all cost. You don't need to start with a ton of bugs.
>>
>>
>> --
>> Don Burn (MVP, Windows DDK)
>> Windows 2k/XP/2k3 Filesystem and Driver Consulting
>> Remove StopSpam from the email to reply
>>
>>
>>
>> "CompuMe" <compume01@gmail.com> wrote in message
>> news:1138896735.635212.177450@z14g2000cwz.googlegroups.com...
>> > Hi,
>> >
>> > I would like to know how to compile a device driver
>> > written in C++. I have seen a product called DriverWorks but i want to
>> > figure out if there is another way to do so.
>> >
>> > regards,
>> > CompuMe
>> >
>>
>>
>>
=====================
Mark Roddy DDK MVP
Windows Vista/2003/XP/2000 Consulting
Device and Filesystem Drivers
Hollis Technology Solutions 603-321-1032
www.hollistech.com