Useful Tip For People Using VC IDE

Thought I would share this small bit of info.

I use the visual studio IDE for development of my driver code - and I use
ddkbuild bat for compiling it:

Something I do which makes organizing my C code much easier is
to declare a class with the same name as my .c and .h files - I just
add a conditional in front of the declaration that is never realized.

For example in my header for a block buffer routine I have this:

virtual ~ZT_BLOCKBUFFER();


And in the .c implementation file I have this (at the top):





Now in the IDE I can jump around my various units. By clicking on the
ctor - I am inside the .c file, clicking on the def - I am in the def.

The actual class is created by the VC wizard (which is why it
has a dtor - you could remove it if you wanted to do so). I find it
convienant to let the wizard create the .h and .c for me and do not
care about the dtor being there.

I guess if you wanted to get fancy you could create some sort of plugin
to VC to do all the if-defing for you.

Hope this is helpful to someone.