Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

New APIs to Enumerate Remote Printer Resources

IP.com Disclosure Number: IPCOM000107800D
Original Publication Date: 1992-Mar-01
Included in the Prior Art Database: 2005-Mar-22
Document File: 4 page(s) / 135K

Publishing Venue

IBM

Related People

Chernow, RL: AUTHOR [+4]

Abstract

Disclosed is a technique which enables a client in a client server environment to manage printers at the server without requiring the client to have special knowledge of data structures at the server.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 38% of the total text.

New APIs to Enumerate Remote Printer Resources

       Disclosed is a technique which enables a client in a
client server environment to manage printers at the server without
requiring the client to have special knowledge of data structures at
the server.

      Three new Application Programming Interfaces (APIs) are
disclosed that enable the configuration of remote print subsystems.
Besides allowing the configuration of remote print subsystems, the
present APIs make it possible to change the underlying technology for
print subsystems without changing any programs that call the APIs.

      In an IBM OS/2* LAN environment, configuring the print
subsystem requires obtaining information about printer resources.
The print subsystem stores this information in the file OS2SYS.INI.
Programs (such as the OS/2 Print Manager) access the information via
calls to PrfQueryProfileString.  Part of the information retrieved
via calls to PrfQueryProfileString is the list of printer drivers,
printer ports and queue processors for the system. Calls to
PrfQueryProfileString cannot be redirected across the network, making
it impossible to configure the print subsystem on a remote server.

      To allow the Print Manager to retrieve information on printer
resources on a remote server, three new APIs were created to
enumerate printer resources.  Instead of using calls to
PrfQueryProfileString, the Print Manager now calls these new APIs:
      o   DosPrintDriverEnum - Lists all printer drivers on a
specified machine
      o   DosPrintPortEnum - Lists all printer ports on a specified
machine
      o   DosPrintQProcessorEnum - Lists all queue processors on a
specified machine.

      The OS/2 LAN Server will remote these APIs to a server if the
caller specifies a server name in the call to the API.

      By using an API, instead of reading from a file, it is possible
to change the underlying technology used to store print information
from a fixed file format to some other format without changing any
code in the Print Manager. Instead, only a new version of the APIs is
needed.

      The C language format of the APIs is specified below.
DosPrintDriverEnum

      DosPrintDriverEnum enumerates the printer drivers installed on
a server or local machine.  This enumeration is obtained via querying
the Spooler's internal data structures (obtained via reading data in
the file OS2SYS.INI).
      Syntax
      unsigned far Pascal DosPrintDriverEnum ( char far *
pszHostname,
                      short                  sLevel,
                      char far *             pbBuf,
                      unsigned short         usBuflen,
                      unsigned short far *   pusRead,
                      unsigned short far *   pusTotal
               ...