3.1.4.5.1 RpcAddForm (Opnum 30)
RpcAddForm adds a form name to the list of supported forms.
DWORD RpcAddForm( [in] PRINTER_HANDLE hPrinter, [in] FORM_CONTAINER* pFormInfoContainer );
-
hPrinter: This parameter MUST specify a handle to a printer object or server object that MUST have been opened using the RpcAddPrinter, RpcAddPrinterEx, RpcOpenPrinter, or RpcOpenPrinterEx methods.
-
pFormInfoContainer: This parameter MUST adhere to the parameter specification in FORM_CONTAINER Parameters (section 3.1.4.1.8.4).
-
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 the following:
-
Perform the validation steps that are specified in PRINTER_HANDLE Parameters (section 3.1.4.1.11).
-
Perform the validation steps that are specified in FORM_CONTAINER Parameters (section 3.1.4.1.8.4).
-
Verify that the form does not already exist, and if that verification fails, return ERROR_FILE_EXISTS, as specified in [MS-ERREF].
-
Additional validation MAY<380> 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:
-
Create the form object.
-
If any clients have registered for notification of server object changes, a notification MUST be broadcast to them.
-
Return the status of the operation.