3.1.4.12.3 RpcDeleteJobNamedProperty (Opnum 112)
RpcDeleteJobNamedProperty deletes an existing Job Named Property (section 3.1.1) for the specified print job.<399>
-
DWORD RpcDeleteJobNamedProperty( [in] PRINTER_HANDLE hPrinter, [in] DWORD JobId, [in, string] const wchar_t* pszName );
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 deleted. This pointer MUST NOT be NULL.
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 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 pszName parameter is a pointer to a string. If this verification fails, return ERROR_INVALID_PARAMETER.
Verify that the value of the pszName parameter corresponds to an existing 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 client. Otherwise, the server MUST process the message and compose a response to the client as follows:
Delete the property specified by the pszName parameter for the print job specified by the JobId parameter.
Return the status of the operation.