locked
Printer interface class GUID: where do I find the guids?

    Question

  • Hello guys,

    I've noticed that this sample uses some predefined guids for building the AQS query used for enumerating printers:

    http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh872189.aspx

    In that sample, it uses GUID {0ECEF634-6EF0-472A-8085-5AD023ECBCCD} for identifying the printer class and it does work.

    I've also found this info in another link:http://msdn.microsoft.com/en-us/library/windows/hardware/ff553426(v=vs.85).aspx

    Printers
    Class = Printer
    ClassGuid = {4d36e979-e325-11ce-bfc1-08002be10318}

    This class includes printers.

    Printers, Bus-specific class drivers
    Class = PNPPrinters
    ClassGuid = {4658ee7e-f050-11d1-b6bd-00c04fa372a7}

    This class includes SCSI/1394-enumerated printers. Drivers for this class provide printer communication for a specific bus.

    Now, as you can see, the GUIDs are completely different from the one I've found in the docs. 

    Can anyone point me to the docs which have the class GUIDs for building the aqs queries based on the class interface? 

    thanks


    Luis Abreu

    Wednesday, May 16, 2012 6:22 PM

Answers

  • There seems to be confusion in this thread about two completely different classes so let me try to clear this up.

    A Device Interface Class GUID is the “name” for a functional contract implemented by a device.  It is very much the same concept as a IID in COM.  A single instance of a device can implement many different functional contracts and therefore have many interfaces with different interface classes.

    The Device Setup Class GUID (also referred to as the Installer Class GUID) is a “name” for the installer that should be selected to install a specific INF.

    The two concepts are completely unrelated but often confused because they both have “Class GUID” as part of their name.

    There is not definitive list of Interface Class GUIDs, and indeed, anyone can define a new one.  There are of course some well-known interface classes defined by Windows.  I do not know of a list of these either but they tend so to documented with the documentation that describes the functionality of the contract.

    In the Windows Runtime device related classes, the class that expose the functionality that you want to use typically has a GetDeviceSelector() function.  This selector returns a AQS string that can be used when enumerating devices with Windows.Devices.Enumeration.DeviceInforamtion.  This avoids having to know the GUIDs or other details that are needed to filter devices that can be used to activate the functionality that is to be used.

    Thursday, May 24, 2012 6:45 PM
  • Hi Luis,

    I can't find that GUID documented on MSDN, but I can tell you what it is. That is the GUID that identifies the device interface for a printer. The other two GUIDs you point at identify the device class for the printer, and the printer bus driver respectively.

    Thanks!

    Justin

    Thursday, May 24, 2012 6:02 PM

All replies

  • Hi Luis,

    You can enumerate all of the devices using the next document in the series:

    http://msdn.microsoft.com/en-us/library/windows/apps/hh465007.aspx

    Is that what you are looking for?

    -Jeff


    Jeff Sanders (MSFT)

    Wednesday, May 16, 2012 8:27 PM
    Moderator
  • Helçlo Jeff.

    Nop. I'm looking for a list of guids for the device classes for using AQS queries. For instance, if you take a look at this link:

    http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh872189.aspx

    You'll find this code:

    void InterfaceClasses_SelectionChanged(object sender, SelectionChangedEventArgs e)
            {
                if (InterfaceClasses.SelectedItem == PrinterInterfaceClass)
                {
                    InterfaceClassGuid.Text = "{0ECEF634-6EF0-472A-8085-5AD023ECBCCD}";
                }
                else if (InterfaceClasses.SelectedItem == WebcamInterfaceClass)
                {
                    InterfaceClassGuid.Text = "{E5323777-F976-4F5B-9B55-B94699C46E44}";
                }
                else if (InterfaceClasses.SelectedItem == WpdInterfaceClass)
                {
                    InterfaceClassGuid.Text = "{6AC27878-A6FA-4155-BA85-F98F491D4F33}";
                }
            }

    I'm after some sort of link which lists the guids which I can use for querying devices. makes sense?


    Luis Abreu

    Wednesday, May 16, 2012 9:15 PM
  • OK but the second link was not the correct guids?

    Jeff Sanders (MSFT)

    Thursday, May 17, 2012 2:03 PM
    Moderator
  • Hello again Jeff.

    If you're talking about this http://msdn.microsoft.com/en-us/library/windows/hardware/ff553426(v=vs.85).aspx, then the answer is no. Searching for the guid presented in the sample returns no match and using the guids associated with printers simply doesn't return any DeviceInformation object in my code.

    So, the question remains: where do I find the list of guids for the interface device classes? It must be defined somewhere, right?


    Luis Abreu

    Thursday, May 17, 2012 2:28 PM
  • Jeff, any more info about this?

    Luis Abreu

    Monday, May 21, 2012 6:50 PM
  • Can you get me some more info on why you need these?  There is very little you can do with this information.  A very concrete example will help me relay this to the printing experts.

    Jeff Sanders (MSFT)

    Tuesday, May 22, 2012 7:23 PM
    Moderator
  • I'm trying to get the docs which allow me to filter the devices by device type. If you take a look at the device enumeration sample, you'll notice that it uses guids for building the queries that it uses to return the devices. I'm assuming that there are other guids for other device families, right? where do i get them?

    Luis Abreu

    Tuesday, May 22, 2012 9:57 PM
  • Hi Luis,

    I can't find that GUID documented on MSDN, but I can tell you what it is. That is the GUID that identifies the device interface for a printer. The other two GUIDs you point at identify the device class for the printer, and the printer bus driver respectively.

    Thanks!

    Justin

    Thursday, May 24, 2012 6:02 PM
  • He is looking for a list of all the guids for device types.  Do you know where this is documented?

    Jeff Sanders (MSFT)

    Thursday, May 24, 2012 6:04 PM
    Moderator
  • Hello guys.

    Yes Jeff, that's it. If I get that list, then I can get a list of all devices by using the same query and just changing the guid.


    Luis Abreu

    Thursday, May 24, 2012 6:39 PM
  • There seems to be confusion in this thread about two completely different classes so let me try to clear this up.

    A Device Interface Class GUID is the “name” for a functional contract implemented by a device.  It is very much the same concept as a IID in COM.  A single instance of a device can implement many different functional contracts and therefore have many interfaces with different interface classes.

    The Device Setup Class GUID (also referred to as the Installer Class GUID) is a “name” for the installer that should be selected to install a specific INF.

    The two concepts are completely unrelated but often confused because they both have “Class GUID” as part of their name.

    There is not definitive list of Interface Class GUIDs, and indeed, anyone can define a new one.  There are of course some well-known interface classes defined by Windows.  I do not know of a list of these either but they tend so to documented with the documentation that describes the functionality of the contract.

    In the Windows Runtime device related classes, the class that expose the functionality that you want to use typically has a GetDeviceSelector() function.  This selector returns a AQS string that can be used when enumerating devices with Windows.Devices.Enumeration.DeviceInforamtion.  This avoids having to know the GUIDs or other details that are needed to filter devices that can be used to activate the functionality that is to be used.

    Thursday, May 24, 2012 6:45 PM
  • Hello Bertus.

    Thanks for clarifying the terms we're using here.

    Yes, I'm interested in getting the list of guids for well-known contracts, but now, it seems like that is an impossible mission...


    Luis Abreu

    Thursday, May 24, 2012 7:10 PM