220.127.116.11.5 RpcDeletePrinterDriver (Opnum 13)
RpcDeletePrinterDriver removes the specified printer driver from the list of supported drivers for a server.
DWORD RpcDeletePrinterDriver( [in, string, unique] STRING_HANDLE pName, [in, string] wchar_t* pEnvironment, [in, string] wchar_t* pDriverName );
pName: Specified in Print Server Name Parameters (section 18.104.22.168.4).
pEnvironment: Specified in Environment Name Parameters (section 22.214.171.124.3).
pDriverName: This parameter MUST be a non-NULL pointer to a string that MUST specify the name of the printer driver to delete. For rules governing printer driver names, see section 126.96.36.199.
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].
Upon receiving this message, the server MUST validate parameters as follows:
Perform the validation steps that are specified in Print Server Name Parameters.
Perform the validation steps that are specified in Environment Name Parameters.
Verify that the string pointed to by the pDriverName parameter contains the name of a driver that is part of the list of drivers that are installed on the server for the environment specified by the string pointed to by the pEnvironment parameter; if that verification fails, return ERROR_UNKNOWN_PRINTER_DRIVER.
Verify that the printer driver is not used by any printer in the system, and if that verification fails, return ERROR_PRINTER_DRIVER_IN_USE.
Additional validation MAY<383> be performed.
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:
Clear all references to this printer driver from any other data structures.
Delete the printer driver object.
If any clients have registered for notifications of the server object change, a notification MUST be broadcast to them.
Return the status of the operation.