Simple Driver using c++?

Hello all,
I am writing a simple driver that just listens to processes being created
using process create notification. My question though is whether I could
create this driver this using c++? I did some driver development a while
back and I remember that drivers had to be implemented using C. Are there
toolkits I could use to create a c++ driver?

Thanks,
J

This is a complex issue that raises lots of strong opinions. Take a look at
http://www.microsoft.com/whdc/driver/kernel/KMcode.mspx for some basic
information on the problems. Consider looking at the archives of NTDEV for
a lot of discussions. If you still want to use C++ go to
http://www.hollistech.com/ and under resources get the C++ Kernel Runtime
Environment.


Don Burn (MVP, Windows DDK)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

“Jonathon” wrote in message news:xxxxx@ntdev…
> Hello all,
> I am writing a simple driver that just listens to processes being created
> using process create notification. My question though is whether I could
> create this driver this using c++? I did some driver development a while
> back and I remember that drivers had to be implemented using C. Are there
> toolkits I could use to create a c++ driver?
>
> Thanks,
> J
>
>
>
> Information from ESET NOD32 Antivirus, version of virus
> signature database 4014 (20090416)

>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>

Information from ESET NOD32 Antivirus, version of virus signature database 4014 (20090416)

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

I do use C++ for most of my kernel work, but I would still agree with everything that done said, and
I would add not to use DriverWorks (if you happen upon it).

Given that what you’re describing sounds like a simple NT4 style driver and that you’re relatively
new to this, I would suggest that unless you are interested in using c++ just for
fun/experimentation/whatever and you have no deadline per se, or unless of course you have a client
who just wants it done this way, I would not use c++. There are a number of reasons, most of which
are covered in the paper that Don referenced, but one that isn’t and one that is I think the most
important to consider ahead of time is that by using C++, you are pretty much guaranteeing that you
will received very little help from this list, both because not all that many of us have experience
with it (or so it seems), but also because it adds a whole layer of unknown to every project.

Good luck,

mm

Don Burn wrote:

This is a complex issue that raises lots of strong opinions. Take a look at
http://www.microsoft.com/whdc/driver/kernel/KMcode.mspx for some basic
information on the problems. Consider looking at the archives of NTDEV for
a lot of discussions. If you still want to use C++ go to
http://www.hollistech.com/ and under resources get the C++ Kernel Runtime
Environment.

Don Burn wrote:

This is a complex issue that raises lots of strong opinions. Take a look at
http://www.microsoft.com/whdc/driver/kernel/KMcode.mspx for some basic
information on the problems. Consider looking at the archives of NTDEV for
a lot of discussions. If you still want to use C++ go to
http://www.hollistech.com/ and under resources get the C++ Kernel Runtime
Environment.

Considering the blood that has been spilled over this issue, your
summary is accurate, even-handed, well-stated, and concise. My
congratulations.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

I think you are asking your question in the wrong NG - after all, these days we have NTTALK forum, and this discussion firmly belongs there…

Using C++ in driver projects is really sensitive issue that normally results in hot debates and threads with minimum 150 posts, and the range of topics discussed on those threads normally goes well beyond Windows driver development . If you search the archives, you will see that “C vs C++” threads invariably have elements of “Windows vs Linux” discussion, and “tabs vs spaces” ones may turn up as well from time to time. In addition to that you may also find “microkernel vs monolith” arguments; discussions of RT scheduling issues; comparisons of Linux and FreeBSD VFSs; etc,etc,etc ( BTW, those who recall the funny thread where I was accused of supporting genocide, probably , also recall that originally that thread had started as “C vs C++” discussion as well ) …

The very idea behind introducing NTTALK is to move those discussions to a separate list so that they don’t pollute NTDEV and NTFSD. Therefore, please post your question to NTTALK… and let’s see what is
going to happen this time…

Anton Bassov

> these days we have NTTALK forum

NB: As far as I see, it’s not available via NNTP yet.

Works just fine with OE. Have you joined the list via the web interface?
Then you can change your option to no email.

“Hagen Patzke” wrote in message news:xxxxx@ntdev…
>> these days we have NTTALK forum
>
> NB: As far as I see, it’s not available via NNTP yet.
>