184.108.40.206.11 RpcPlayGdiScriptOnPrinterIC (Opnum 41)
RpcPlayGdiScriptOnPrinterIC returns font information for a printer connection. UNIVERSAL_FONT_ID (section 220.127.116.11) structures are used to identify the fonts.
DWORD RpcPlayGdiScriptOnPrinterIC( [in] GDI_HANDLE hPrinterIC, [in, size_is(cIn)] BYTE* pIn, [in] DWORD cIn, [out, size_is(cOut)] BYTE* pOut, [in] DWORD cOut, [in] DWORD ul );
pIn: A pointer that SHOULD be set to NULL when sent and MUST be ignored on receipt.
cIn: A value that SHOULD be set to zero when sent and MUST be ignored on receipt.
pOut: A pointer to a buffer, the size and contents of which are determined by the value of the cOut parameter.
cOut: The size, in bytes, of the buffer pointed to by pOut.
ul: A value that SHOULD be set to zero when sent and MUST be ignored on receipt.
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:
Verify that hPrinterIC is a valid printer information context handle. This method SHOULD assume that this handle can be used without further access checks.<332>
Verify that the value of the pOut parameter is not NULL.<333>
Verify the value of the cOut parameter as follows:
If cOut is less than 0x00000004, ERROR_NOT_ENOUGH_MEMORY SHOULD be returned, as specified in [MS-ERREF].
If cOut is equal to 0x00000004, proceed.
If cOut is greater than 0x00000004, it specifies the size of the buffer pointed to by the pOut parameter. In this case, the minimum value of cOut is computed as follows:
((*pOut) * (size of(UNIVERSAL_FONT_ID))) + 0x00000004
The buffer pointed to by pOut MUST be large enough to contain all the font information plus a DWORD for the number of fonts. If the value of cOut is less than this minimum, ERROR_NOT_ENOUGH_MEMORY SHOULD be returned.
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 cOut is equal to 0x00000004, the value of pOut is a pointer to a DWORD that specifies the number of UNIVERSAL_FONT_ID structures to be returned by the next call to this method.
If cOut is greater than 0x00000004, font information MUST be returned as follows:
Query the fonts that are available on the server.
Write the DWORD number of fonts to the buffer location that is pointed to by the value of the pOut parameter.
Write UNIVERSAL_FONT_ID structures for the fonts to the buffer location that is pointed to by the value of pOut plus 0x00000004.
Return the status of the operation.
Except for diagnostic purposes, the server state, as visible to the client through this or any other protocol, MUST NOT change as a result of processing this call.