3.1.4.5.2 RpcDeleteForm (Opnum 31)
RpcDeleteForm removes a form name from the list of supported forms.
-
DWORD RpcDeleteForm( [in] PRINTER_HANDLE hPrinter, [in, string] wchar_t* pFormName );
hPrinter: A handle to a printer object or server object that MUST have been opened by using the RpcAddPrinter, RpcAddPrinterEx, RpcOpenPrinter, or RpcOpenPrinterEx methods.
pFormName: A pointer to a string that MUST identify the form to delete. For rules governing form names, see section 2.2.4.5.
Return Values: This method MUST return zero (ERROR_SUCCESS) to indicate successful completion or a nonzero Windows error code to indicate failure [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).
Verify that the pFormName parameter points to a string that identifies an existing form. If that verification fails, return ERROR_INVALID_FORM_NAME [MS-ERREF].
Additional validation MAY<354> 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 the references to this form from any other data structures.
Delete 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.