EnumPrintProcessors

  BOOL EnumPrintProcessors(pName, pEnvironment, Level, pPrintProcessorInfo, cbBuf, pcbNeeded, pcReturned)    
  LPTSTR pName;    
  LPTSTR pEnvironment;    
  DWORD Level;    
  LPBYTE pPrintProcessorInfo;    
  DWORD cbBuf;    
  LPDWORD pcbNeeded;    
  LPDWORD pcReturned;    

The EnumPrintProcessors function enumerates all the print processors installed on the specified printer server.

Parameters

pName

Points to a null-terminated string specifying the Server that the Print Processors are to be enumerated upon. If NULL, then the Print Processors installed locally are returned.

pEnvironment

Pointer to a string that specifies the machine and operating system environment. An example is the string “W32X86”. If NULL, then the current Environment is used.

Level

This value must be 1.

pPrintProcessorInfo

Pointer to a buffer that the function will fill with PRINTPROCESSOR_INFO_1 data structures for the enumerated printer drivers.

cbBuf

Specifies the size in bytes of the buffer pointed to by pPrintProcessorInfo.

pcbNeeded

This points to a variable that will be updated to contain the actual buffer size required that is pointed to by pDriverInfo. If cbBuf is too small then GetLastError will indicate ERROR_BUFFER_TOO_SMALL, and pcbNeeded will contain the size required. If cbBuf is large enough, then pcbNeeded will contain the number of bytes that were copied.

pcReturned

Pointer to a DWORD that the function will set to the number of print processors enumerated.

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred. To obtain extended error information, use the GetLastError function.