class implementation in driver development

Hi All,

Is it possible to implement class in mini-filter drivers?

Thanks

My drivers ALL have class. :slight_smile:

Seriously, though, can you clarify your question please.

Class = C++ Class/method

Class = Generic processing for group of device of like characteristics which may be accessed via different ports, such as DISK.SYS (Disk Class), CD-ROM/DVD Class, Tape Class, etc…

Peter
OSR
@OSRDrivers

sorry for incomplete question,

I wanted to use c++/method(my own) class in my driver.

Is it possible?

Yes.

But no C++ exceptional handling. No ATL. And no… some other stuff… If you really want to know, somebody who actually programs in C++ (and that would not be me) can tell you here.

But class/method organization for your code, yes. You can.

Peter
OSR
@OSRDrivers

Cool,

@Peter Viscarola - I need to implement only limited functionality.

So Is there any documentation or examples?

It will be great help for me.

xxxxx@osr.com wrote:

Yes.

But no C++ exceptional handling.

My C++ is always exceptional. I think you meant “exception”. Blame
your phone.

No ATL.

Certainly no STL, because of exceptions, but ATL doesn’t use them.
Theoretically, it could work. Most of ATL addresses user-mode API
stuff, but the container classes should work.

Hmmm…


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

seriously guys I need reference :slight_smile:

Then you are seriously in trouble and should not use c++. There are no km samples, but then what would they show? Just add cpp files to the project and code away.

d

Bent from my phone


From: xxxxx@gmail.commailto:xxxxx
Sent: ?4/?3/?2015 2:19 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] class implementation in driver development

seriously guys I need reference :slight_smile:


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</mailto:xxxxx></mailto:xxxxx>

xxxxx@gmail.com wrote:

seriously guys I need reference :slight_smile:

What do you think you need to know? If you are a C++ programmer, then
it should be pretty clear where classes help and where they just get in
the way. If you’re not a C++ programmer, then you shouldn’t be trying
to learn it in the kernel.

The AVStream samples and the MSVAD sample driver are all written in C++
using classes.


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

Hmmmm. I believe the ATL stuff like Vector and Map (Are they “container classes”) rely on C++ exceptions, no?

Peter
OSR
@OSRDrivers

xxxxx@osr.com wrote:

Hmmmm. I believe the ATL stuff like Vector and Map (Are they “container classes”) rely on C++ exceptions, no?

No. Well, “yes”, those are the container classes, but “no”, they don’t
rely on exceptions. The few ATL functions that want to throw exceptions
all call an AtlThrow function that is replaceable. It CAN throw C++
exceptions, or it can call RaiseException to use Windows’ structured
exceptions, or you can do your own thing.

Is it possible? Yes. Is it practical? Probably not…


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

thanks all.
I am going to stick with no class (c++) approach.

:slight_smile: