Jump to content

DosPFSVerifyFont: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
No edit summary
Line 1: Line 1:
{{Legacy
|RepFunc=
|Remarks=This page list the older version of the function for reference.
}}
This call indicates whether the specified code page and font within that code page are available in the font file for the specified printer.
This call indicates whether the specified code page and font within that code page are available in the font file for the specified printer.



Revision as of 03:57, 16 September 2017

Legacy Function Warning
It is recommended to use a newer replacement for this function.
Replacement:
Remarks: This page list the older version of the function for reference.

This call indicates whether the specified code page and font within that code page are available in the font file for the specified printer.

Syntax

DosPFSVerifyFont (PrinterName, CodePage, FontID, Reserved)

Parameters

PrinterName (PSZ) - input
Address of the name of the printer that queries the code page and font switching setup.
CodePage (USHORT) - input
Code page to validate. Values are in the range 0 through 65535.
FontID (USHORT) - input
Font ID to validate. Values are in the range 0 through 65535. A value of 0 indicates that any font within the specified code page is acceptable.
Reserved (ULONG) - input
Reserved must be set to zero.

Return Code

rc (USHORT) - return

Return values are:

  • Code page not available.
  • Font ID not available.
  • 10 Invalid printer name as input.
  • 13 Received code page request when code page switcher not initialized.

Remarks

DosPFSVerifyFont is intended for use only by applications that replace the spooler as a print monitor and that do code page switching. Other applications should use printer IOCTLs to manipulate printer code page switching.

DosPFSVerifyFont is located in SPOOLCP.DLL (not in DOSCALLS.LIB) and requires an import statement in the module definition file. Refer to the IBM Operating System/2 Version 1.2 Building Programs, Module Definition File Statements section for information about the import statement.

Example Code

C Binding

#define INCL_DOSPFS

USHORT  rc = DosPFSVerifyFont(PrinterName, CodePage, FontID, Reserved);

PSZ              PrinterName;   /* Printer name string */
USHORT           CodePage;      /* Code Page to validate */
USHORT           FontID;        /* Font Id to validate */
ULONG            0;             /* Reserved, set to zero */

USHORT           rc;            /* return code */

MASM Binding

EXTRN  DosPFSVerifyFont:FAR
INCL_DOSPFS         EQU 1

PUSH@  ASCIIZ  PrinterName   ;Printer name string
PUSH   WORD    CodePage      ;Code Page to validate
PUSH   WORD    FontID        ;Font Id to validate
PUSH   DWORD   0             ;Reserved (must be zero)
CALL   DosPFSVerifyFont

Returns WORD

Related Functions