3.1.4.1.9 RpcAsyncSetPrinterDataEx (Opnum 19)

RpcAsyncSetPrinterDataEx sets configuration data for the specified printer or print server. This method is similar to RpcAsyncSetPrinterData (section 3.1.4.1.8) but also allows the caller to specify the registry key under which to store the data.

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

 DWORD RpcAsyncSetPrinterDataEx(
   [in] PRINTER_HANDLE hPrinter,
   [in, string] const wchar_t* pKeyName,
   [in, string] const wchar_t* pValueName,
   [in] DWORD Type,
   [in, size_is(cbData)] unsigned char* pData,
   [in] DWORD cbData
 );

hPrinter: A handle to a printer object or server 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 specified in [MS-RPRN] section 3.1.4.2.18.