3.1.4.1.3 RpcAsyncDeletePrinter (Opnum 7)

RpcAsyncDeletePrinter deletes the specified printer object.

The counterpart of this method in the Print System Remote Protocol is RpcDeletePrinter. All parameters not defined below are specified in [MS-RPRN] section 3.1.4.2.4.

The client MUST call RpcAsyncClosePrinter (section 3.1.4.1.10) with the PRINTER_HANDLE ([MS-RPRN] section 2.2.1.1.4) represented by the hPrinter parameter after calling RpcAsyncDeletePrinter.

 DWORD RpcAsyncDeletePrinter(
   [in] PRINTER_HANDLE hPrinter
 );

hPrinter: A handle to a printer object that has been opened using either RpcAsyncOpenPrinter (section 3.1.4.1.1) or RpcAsyncAddPrinter (section 3.1.4.1.2).

Return Values: This method returns zero to indicate successful completion or a nonzero Win32 error code ([MS-ERREF] section 2.2) to indicate failure. The client MUST treat any nonzero return value as a fatal error.

Exceptions Thrown: This method MUST NOT throw any exceptions other than those that are thrown by the underlying RPC protocol [MS-RPCE].

This method MUST adhere to the parameter validation, processing, and response requirements that are specified in [MS-RPRN] section 3.1.4.2.4.