locked
DeviceCapabilities - Installed trays among available trays/bins RRS feed

  • Question

  •  

    Hi there,

     

     

    Finding the "available" paperbins is almost easy using the 'DeviceCapabilities' API (DC_BINS). But this gives a complete list of the possible paperbins (paper tray), even those not installed or in error (out of paper, ...).

     

    Is there any method to retrieved the installed paper bins among the whole list ?

     

    Thanks

    Wednesday, February 6, 2008 8:36 AM

All replies

  • int nNumPapers = DeviceCapabilities( "hp deskjet 920c series", "LPT1",
    DC_PAPERNAMES, NULL, NULL );


    char* papers = new char[ nNumPapers * 64 ];
    ZeroMemory( papers, nNumPapers * 64 );
    DeviceCapabilities( "hp deskjet 920c series", "LPT1",
    DC_PAPERNAMES, papers, NULL );

    for( int i = 0; i < nNumPapers; i++ )
    {
    std::cout << papers << std::endl;
    papers += 64;
    }

     

     

    try using this for checking the installed paper bins

    Saturday, February 9, 2008 7:43 AM
  • int nNumPapers = DeviceCapabilities( "hp deskjet 920c series", "LPT1",
    DC_PAPERNAMES, NULL, NULL );


    char* papers = new char[ nNumPapers * 64 ];
    ZeroMemory( papers, nNumPapers * 64 );
    DeviceCapabilities( "hp deskjet 920c series", "LPT1",
    DC_PAPERNAMES, papers, NULL );

    for( int i = 0; i < nNumPapers; i++ )
    {
    std::cout << papers << std::endl;
    papers += 64;
    }

     

     

    try to search the installed paper bins
    Saturday, February 9, 2008 7:44 AM