What do you mean by virtual camera driver?
You can create a virtual capture device using DirectShow. Such a virtual capture device can then be used by applications such as skype, etc. If this is enough for your needs, you can download vcam from http://tmhare.mvps.org/downloads.htm in the "Capture Source Filter" section.
Edit: To use this capture device in a published link, you need to download the Windows SDK. The Windows SDK has a tool called "GraphEdit". If you are doing an online search, I am sure you can find a quick GraphEdit tutorial. In principle, GraphEdit allows you to create a multimedia pipeline by connecting many filters. (This is what happens in the background, for example, when you play a movie on your computer.) It could be something like
webcam โ rendering
or
file source โ some decoder โ visualizer
and will lead to the video captured by the webcam or the contents of the file. The download example shows how you can create a virtual capture device, that is, it looks like the media comes from a "real" capture device, but in fact you can generate any video you want, if you adapt the code to your specific means, have take screengrab and exit it. Applications such as skype can get your virtual capture device if it is registered correctly.
The easiest way to find out if this is enough for your needs is to load the capture source filter, register it using the regsvr32 command, and then use GraphEdit to insert the capture source into the graph, connect the source to the video renderer and click the play button. Many of the above concepts / keywords may seem new to you, but you can do some reading on each topic, and perhaps this will give you the opportunity to start.
Edit 2: Is the capture source filter approach insufficient for your requirements? 1) AFAIR, you stated in your (now deleted) answer that you want to take a screen capture and use it as a virtual camera device for use in applications such as skype.
If thatโs all you need, you donโt need to write a device driver. DirectShow does a great job with the capture source filter. Then you will need
- learn some basic DirectShow
- change the source code of the capture filter to capture the screen, etc.
As for books, to write a device driver to achieve the same, I have no idea. What I'm trying to do is that you need to determine if you really need to write a device driver, or if the open source capture filter is enough to change.