C++/Help with driver programming
I have to write an application that will monitor the hard disk and do some work when there is an activity on the hard disk (read or write). My problem is that I don't know how to listen the system bus, or how to "catch" the events for reading and writing on hard disk. I am using C and compile with DDK.
Can you help me, or indicate someone else who may know the answer to this question?
Thank you very much!
You're getting into a part of programming that very very few programmers need to do - usually programmers working for a company doing very special tasks. You won't easily find programmers who've done this kind of work. And because what you want is directly coupled to the operating system, you'll have to find experts of the OS. Another difficulty is that what you want to do may be available only internally to the developers of the OS or under license (for example from Microsoft). You don't mention that this is for Windows. Assuming it is, look to the Microsoft usenet (user groups) for information and hope someone can tell you if this information is available, and if so, where. Since I don't know of a DDK for Linux, I don't think you mean Linux, but if you do, of course the source code is available and with some study, you might find you can hook the hard disk drivers at some level.
Sorry I can't really answer this - I've never had to do a device driver. What you want is even more specific in that you want to access data coming in and out of the driver. I think you have to find the source code for a hard disk to do what you want. If you write one, it won't be signed by Microsoft and potentially because it's for a hard disk it won't be accepted during installation.