Export (0) Print
Expand All

3.1.4.12.1 RpcGetJobNamedPropertyValue (Opnum 110)

RpcGetJobNamedPropertyValue retrieves the current value of the specified Job Named Property (section 3.1.1).<453>

DWORD RpcGetJobNamedPropertyValue(
  [in] PRINTER_HANDLE hPrinter,
  [in] DWORD JobId,
  [in, string] const wchar_t* pszName,
  [out] RPC_PrintPropertyValue* pValue
);

hPrinter: A PRINTER_HANDLE (section 2.2.1.1.4) to a printer object, job object, or server object that was opened by RpcAddPrinter (section 3.1.4.2.3), RpcAddPrinterEx (section 3.1.4.2.15), RpcOpenPrinter (section 3.1.4.2.2), or RpcOpenPrinterEx (section 3.1.4.2.14).

JobId: The identifier of a print job. This value MUST NOT be zero.

pszName: A pointer to a string that specifies the Job Named Property to be queried. This pointer MUST NOT be NULL.

pValue: A pointer to an RPC_PrintPropertyValue (section 2.2.1.14.1) structure that on return from this call contains the value of the Job Named Property specified by the pszName argument.

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

On receiving this message, the server MUST validate the following:

  • Perform the validation steps that are specified in PRINTER_HANDLE Parameters (section 3.1.4.1.11).

  • Verify that the value of the JobId parameter corresponds to a job in the list of jobs. If the object specified by the hPrinter parameter is a server object, search for a print job in each printer in the list of printers on the print server. If the object specified by the hPrinter parameter is a printer object, search for a print job only in the list of print jobs for the specified printer. If the object specified by the hPrinter parameter is a job object, compare the identifier of this print job with the specified JobId. If this verification fails, return ERROR_INVALID_PARAMETER.

  • Verify that the value of the pValue parameter is a non-NULL pointer to a string. If this verification fails, return ERROR_INVALID_PARAMETER.

  • Verify that the value of the pszName parameter corresponds to an existent Job Named Property for the print job specified with the JobId parameter. If this verification fails, return ERROR_NOT_FOUND.

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

  • Allocate and initialize a buffer with the PrintPropertyValue structure to be returned to the client via the pValue parameter.

  • Return the status of the operation.

On successful completion of this call, the client SHOULD free the buffer specified by the pValue parameter.

 
Show:
© 2014 Microsoft