22.214.171.124.27 RpcSendRecvBidiData (Opnum 97)
DWORD RpcSendRecvBidiData( [in] PRINTER_HANDLE hPrinter, [in, string, unique] const wchar_t* pAction, [in] RPC_BIDI_REQUEST_CONTAINER* pReqData, [out] RPC_BIDI_RESPONSE_CONTAINER** ppRespData );
hPrinter: A handle to a printer object or port object that was opened by RpcAddPrinter (section 126.96.36.199.3), RpcAddPrinterEx (section 188.8.131.52.15), RpcOpenPrinter (section 184.108.40.206.2), or RpcOpenPrinterEx (section 220.127.116.11.14).
The method MUST enumerate the supported schemas. The pReqData parameter MUST be ignored. The method MUST store one or more values that correspond to supported schema entries in the buffer that is pointed to by the ppRespData parameter.
The method MUST return the specific value item requested. The pReqData parameter MUST specify a single value entry in the schema. The method MUST store the value of that entry in the buffer that is pointed to by the ppRespData parameter.
The method MUST store the supplied data in a single value item in the schema. The pReqData parameter MUST specify a single value entry for the schema and the new value to be stored there. This action MUST NOT change the contents of the buffer that is pointed to by the ppRespData parameter.
The method MUST return one or more value items that are reachable from the requested schema item. The pReqData parameter MUST specify an entry in the schema, which is either a value item or an inner schema entry. The action MUST store one or more value entries, and their associated values, in the buffer that is pointed to by the ppRespData parameter.
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 specified in PRINTER_HANDLE Parameters (section 18.104.22.168.11). This method SHOULD assume that the handle to the printer or port object can be used without further access checks.
Verify that the port monitor supports this method, and if that verification fails, return ERROR_NOT_SUPPPORTED.
Verify that the string that is pointed to by the pAction parameter specifies a valid command and is supported by the port monitor, and if that verification fails, return any of the following error codes to indicate the request cannot be supported: ERROR_NOT_SUPPORTED, ERROR_INVALID_PARAMETER.
Verify that the pReqData is a non-NULL pointer, and if that verification fails, return ERROR_INVALID_PARAMETER.
Additional validation MAY be performed<363>.
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:
If the hPrinter parameter is a handle to a printer object, load the executable object of the monitor supporting the port associated with the printer identified by hPrinter.
If the hPrinter parameter is a handle to a port object, load the executable object of the monitor supporting the port identified by hPrinter.
Invoke the method in that library that is identified by the value of the pAction parameter and pass pReqData to that method.
Copy the data that is sent from the action method in the buffer that is pointed to by the ppRespData parameter; the number of response items MUST match the number of request items.
Return the status of the operation.