3.1.4.5.3 RpcGetForm (Opnum 32)
RpcGetForm retrieves information about a specified form.
-
DWORD RpcGetForm( [in] PRINTER_HANDLE hPrinter, [in, string] wchar_t* pFormName, [in] DWORD Level, [in, out, unique, size_is(cbBuf), disable_consistency_check] BYTE* pForm, [in] DWORD cbBuf, [out] DWORD* pcbNeeded );
hPrinter: A handle to a printer object or server object that was opened by RpcAddPrinter (section 3.1.4.2.3), RpcAddPrinterEx (section 3.1.4.2.15), RpcOpenPrinter (section 3.1.4.2.2), or RpcOpenPrinterEx (section 3.1.4.2.14).
pFormName: A pointer to a string that specifies the form name for which data is required. For rules governing form names, see section 2.2.4.5.
Level: The form information level.
-
Value
Description
0x00000001
Corresponds to _FORM_INFO_1 (section 2.2.2.5.1).
0x00000002
Corresponds to _FORM_INFO_2 (section 2.2.2.5.2).
pForm: A pointer to the BUFFER, as specified in INFO Structures Query Parameters (section 3.1.4.1.9).
BUFFER TYPE: _FORM_INFO.
-
This parameter can be NULL if cbBuf equals zero.
cbBuf: Specified in INFO Structures Query Parameters.
pcbNeeded: Specified in INFO Structures Query Parameters.
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 parameters as follows:
Perform the validation steps that are specified in PRINTER_HANDLE Parameters (section 3.1.4.1.11). This method SHOULD assume that the handle to the printer or server object can be used without further access checks.
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].
Perform the validation steps specified in INFO Structures Query Parameters.
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:
Using information about the form, perform the processing and response steps specified in INFO Structures Query Parameters.
Return the status of the operation.