So lets take a look at what is the most common view of devices on windows
On the left you see the Device Manager. To get to this just right click on My Computer and click Manage then click on Device Manager. You can also add it to the mmc console like I did.
It shows a tree view with your computer listed at the root and devices under neath that.
Each Item under your computer is called a Device Setup Class. Your devices are members of a Device Setup Class.
So you can see the Printer Port device is a member of the Ports Setup Class.
Another Class that is used is called the Device Interface Class. This class basically defines how the device is connected to the computer.
Imagine that you have two CD-ROM Drives. One drive is connected through an IDE Cable to your motherboard and the other is connected by USB. This means that one CD-ROM drive would be in the USB Device interface Class and the other would be in a different Device Interface Class (IDE I guess). But, BOTH would be in the CD-ROM Setup Class.
In my limited experience it seems that for interacting with devices for actions such as getting information on them and disabling/enabling then you'll be using the Device Setup Classes. In the case of registering your application for notifications on devices being inserted and removed then you would be using the Device Interface Classes.
I'll also say that the Device Interface Classes aren't defined in one single location. I think that the issue is that the developer should know the Class that he'll be working with and therefore know things like the GUID and whatnot.
By comparison, the Device Setup Classes' GUIDs are quite readily accessible in one single location. That is what we'll be going over on the next post.
For more information on the Device Classes take a look at Microsoft's MSDN Article.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment