RpcGetPrinterDriverDirectory (Opnum 12)

RpcGetPrinterDriverDirectory retrieves the path of the printer driver directory.

 DWORD RpcGetPrinterDriverDirectory(
   [in, string, unique] STRING_HANDLE pName,
   [in, string, unique] wchar_t* pEnvironment,
   [in] DWORD Level,
   [in, out, unique, size_is(cbBuf), disable_consistency_check] 
     BYTE* pDriverDirectory,
   [in] DWORD cbBuf,
   [out] DWORD* pcbNeeded

pName: Specified in Print Server Name Parameters (section

pEnvironment: Specified in Environment Name Parameters (section

Level: The value 0x00000001.

pDriverDirectory: An optional pointer to BUFFER, as specified in String Query Parameters (section If cbBuf is zero, this parameter SHOULD be NULL.

cbBuf: See String Query Parameters (section

pcbNeeded: See String Query Parameters (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 by performing the validation steps specified in:

  • Print Server Name Parameters (section

  • Environment Name Parameters (section

  • String Query Parameters (section

Additional validation MAY be performed.<316>

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:

  • With the path of the printer driver directory on the print server, perform the processing and response steps specified in String Query Parameters.

  • Return the status of the operation.