Make a .sys File

This is a discussion on Make a .sys File within the Windows Programming forums, part of the Platform Specific Boards category; I want to make a sys file. I dont have any objective in particular, just that i need to make ...

Make a .sys File

I want to make a sys file. I dont have any objective in particular, just that i need to make a sys file.
One of my techers told me to use Microsoft Driver Development Kit, but i dont know what to do. I have programmed in C++, but am more comfortable with C#.
I would be really thankful, if some one could give me some tips and/or point me to some tutorial. I am ready to put in effort and would be really happy if it could be done with VS.net and C#.

When using CreateFile(), the file name can be anything you want it to be, even the extention is at your choice. So just end your file name with ".sys". And to give your system file the system attribute just use FILE_ATTRIBUTE_SYSTEM.

If you've been asked to make an actual NT device driver (Not a task written as vaguely as "make a .sys file"), then you're in deep d'oh. Strictly speaking, device drivers are written in plain C. This is mainly to prevent any sort of dependency on massive amounts of runtime code, which programming in C# (requires .NET Framework), and to a lesser extent C++, would achieve.

I've tried using the Microsoft DDK, it's hard work to set up. Writing a device driver is radically different to application development.

Your teacher is correct. For windows XP you need the Windows 2003 DDK. As far as I know, there is no place to download the DDK on the net. In order to get my copy, I ordered it from MSDN (I only had to pay for shipping).

SMurf is right, drivers are written in C only. Drivers are very tough to write at first, and I strongly suggest you buy a book to get you started. Most driver writing tutorials on the net are poorly written or outdated.

No i dont need to develop a Driver (Thankfully, from what i have heard from you people). The thing is really weird and vague. If some one had asked me a similar question i would have echoed the same sentiments. But our teacher insists on seeing the code (so no renaming) and suggested we use the device driver.
This is very stupid and i dont think i would learn much this way. So i thought about using C# and VS.net as i use am already comfortable with that.
What kind of code automatically generates a .sys file automatically in VS like a MS DDK automatically generates one.

If your teacher told you to go ahead and create a device driver (which a sys file usually is on modern windows systems) without teaching it specifically, then he needs to be carted off to the local nut-house!

I agree with you. Whats even shocking is that its a networking class. Most of my friends are making a simple program for implementing a client server thing, but due to special enimity towards me, he asked me to do this.
He said that read the DDK and stuff and do it. I am fuming coz i dont know what i have to do, how i have to it and why in the whole world do i have to do it!!!!

he obviously wants you to write a driver. the question is what does your driver drive? Without complete hardware specifications for the piece you are writing the driver for you might as well not start because you wont get anywhere.