EnumPrintProcessorDatatypes

The EnumPrintProcessorDatatypes function enumerates the data types that a specifed print processor supports.

BOOL EnumPrintProcessorDatatypes(
  LPTSTR pName,       // points to server name string
  LPTSTR pPrintProcessorName,
                      // points to print processor name string
  DWORD Level,        // specifies version of print processor data 
                      // type structures
  LPBYTE pDatatypes,  // points to buffer to receive print processor 
                      // data type structures
  DWORD cbBuf,        // specifies size, in bytes, of buffer
  LPDWORD pcbNeeded,  // points to number of bytes copied (or 
                      // required)
  LPDWORD pcReturned  // points to number of data structures obtained
);
 

Parameters

pName
Pointer to a null-terminated string that specifies the name of the server on which the print processor resides. If this parameter is NULL, the data types for the local print processor are enumerated.
pPrintProcessorName
Pointer to a null-terminated string that specifies the name of the print processor whose data types are to be enumerated.
Level
Specifies the version of the print-processor data type structures to be stored in the buffer pointed to by pDatatypes. This parameter must be 1.
pDatatypes
Pointer to an array of DATATYPES_INFO_1 structures. One structure is created for each available data type.
cbBuf
Specifies the size, in bytes, of the buffer pointed to by pDatatypes.
pcbNeeded
Pointer to a variable to receive the total size, in bytes, of the array of DATATYPES_INFO_1 structures.

If this value is less than or equal to cbBuf and the function succeeds, this is the number of bytes stored in the buffer pointed to by pDatatypes. If this number is greater than cbBuf, the buffer is too small, and you must call the function again with a buffer size at least as large as *pcbNeeded.

pcReturned
Pointer to a variable that the function sets to the number of data structures stored in the buffer pointed to by pDatatypes.

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

QuickInfo

  Windows NT: Requires version 3.5 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in winspool.h.
  Import Library: Use winspool.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT.

See Also

Printing and Print Spooler Overview, Printing and Print Spooler Functions, DATATYPES_INFO_1, EnumPrintProcessors