NDIS miniport in C++

Hi,

I am interested in writing a new ndis miniport.
I have written many Ndis miniports using the DDK and C.

This new miniport I would like to write it in C++.

Is there anywhere I could find information or sample code for this.

I know that Numega’s Driver network includes a frmaework in C++,
but I would like to create the classes my self so that the code
can be reused on other platforms.

Sunil

xxxxx@neesus.com wrote:

I am interested in writing a new ndis miniport.
I have written many Ndis miniports using the DDK and C.

This new miniport I would like to write it in C++.

Is there anywhere I could find information or sample code for this.

Sample code for NDIS, probably not. A couple of pointers, sure: you’ll
probably need to implement your own operator new and delete to call the
NDIS allocate/free functions, a scheme for running static initializers
and building a list of _atexit routines, and a stub for __purecall. Mark
Roddy’s site (www.hollistech.com) has some infrastructure code that you
might find useful.

One gotcha for NDIS miniports is when to run the static destructors that
have built up in the _atexit list. DriverUnload is the right time to do
this, but NdisMRegisterUnloadHandler is not exported by the 98/Me
versions of NDIS. Last time I tried this, I did it in the MiniportHalt
routine, and that seemed to work okay.


Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Now teaming with John Hyde for USB Device Engineering Seminars
Check out our schedule at http://www.oneysoft.com

> This new miniport I would like to write it in C++.

For what? The vast majority of miniport code is working with the
hardware, I have large doubts that C++ will help here. Looks like you
are adding complexity to your project.

Max