RpcEnumPerMachineConnections (Opnum 87)

Enumerates each of the connections and copies PRINTER_INFO_4 (section structures for all the per-machine connections into the buffer pPrinterEnum.<300>

This method is used for remote administration of client computers running the print system.

 DWORD RpcEnumPerMachineConnections(
   [in, string, unique] STRING_HANDLE pServer,
   [in, out, unique, size_is(cbBuf), disable_consistency_check] 
     BYTE* pPrinterEnum,
   [in] DWORD cbBuf,
   [out] DWORD* pcbNeeded,
   [out] DWORD* pcReturned

pServer: A parameter specified in Print Server Name Parameters (section

pPrinterEnum: A pointer to the BUFFER, as specified in INFO Structures Query Parameters (section


This parameter can be NULL if cbBuf equals zero.

cbBuf: A parameter specified in section

pcbNeeded: A parameter specified in section

pcReturned: A parameter specified in section

Return Values: This method MUST return zero (ERROR_SUCCESS) to indicate successful completion or a nonzero Windows error code to indicate failure [MS-ERREF].

Upon receiving this message, the server MUST validate parameters as follows:

  • Perform the validation steps specified in section

  • Perform the validation steps specified in section

  • This method SHOULD NOT perform any access checks.

If parameter validation fails, the server MUST fail the operation immediately and return a nonzero error response to the client. Otherwise, the server MUST process the message and compose a response to the client as follows:

  • Enumerate all printers in the list of per-machine connections on the server that is identified by the pServer parameter (regardless of whether the user has logged on and the printer object has actually been created).

  • Using the enumerated objects, perform the processing and response steps specified in section

  • Return the status of the operation.

The server MUST NOT change the list of printer objects representing pushed printers as part of processing this method.