Difference between revisions of "DosPFSActivate"
From EDM2
m |
m (→Remarks) |
||
Line 35: | Line 35: | ||
DosPFSActivate 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. | DosPFSActivate 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. | ||
− | DosPFSActivate is located in SPOOLCP.DLL (not in DOSCALLS.LIB) and requires an import statement in the module definition file. See the ''IBM Operating System/2 Version 1.2 Building Programs'', Module Definition File Statements section for information regarding the import statement. | + | DosPFSActivate is located in [[SPOOLCP.DLL]] (not in DOSCALLS.LIB) and requires an import statement in the module definition file. See the ''IBM Operating System/2 Version 1.2 Building Programs'', Module Definition File Statements section for information regarding the import statement. |
==Bindings== | ==Bindings== |
Latest revision as of 03:07, 26 January 2020
This call specifies the code page and font to make active for the specified printer and system file number.
Syntax
DosPFSActivate (SplHandle, BytesWritten, PrinterName, CodePage, FontID, SFN, Reserved)
Parameters
- SplHandle (PVOID) - input
- Address of the file handle of the temporary spool file that activates code page and font switching.
- BytesWritten (PULONG) - output
- Address of the number of bytes written to the temporary spool file.
- PrinterName (PSZ) - input
- Address of the name of the printer that activates code page and font switching.
- CodePage (USHORT) - input
- Active code page for the specified printer and system file number.
- FontID (USHORT) - input
- Active font within the specified code page for the specified printer and system file number.
- For download fonts, the FontID is that specified in the printer font file.
- For cartridge fonts, the FontID is the number specified on the label of the cartridge and in the DEVINFO statement for the printer.
- A value of 0 (0000H) for both the CodePage and FontID indicates that the hardware default code page and font should be made active.
- A value of 0 for the font ID but not the code page indicates that any font ID is acceptable for the code pages.
- SFN (USHORT) - input
- System file number of the requester. The SFN is passed as a parameter in the monitor packet.
- Reserved (ULONG) - input
- Reserved must be set to zero.
Return Code
- rc (USHORT) - return
- Return code descriptions are listed in following section.
- Return values are:
- Code page not available.
- Font ID not available.
- Code page switcher internal error.
- 10 Invalid printer name as input.
- 13 Received code page request when code page switcher not initialized.
- 15 System file number table full. Cannot activate another entry.
- 19 I/O error reading font file control sequence section.
- 21 I/O error reading font file font definition block.
- 23 I/O error while writing to temporary spool file.
- 24 Disk full error while writing to temporary spool file.
- 25 Bad spool file handle.
Remarks
DosPFSActivate 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.
DosPFSActivate is located in SPOOLCP.DLL (not in DOSCALLS.LIB) and requires an import statement in the module definition file. See the IBM Operating System/2 Version 1.2 Building Programs, Module Definition File Statements section for information regarding the import statement.
Bindings
C
#define INCL_DOSPFS USHORT rc = DosPFSActivate(SplHandle, BytesWritten, PrinterName, CodePage, FontID, SFN, Reserved); PVOID SplHandle; /* Temporary Spool File handle */ PULONG BytesWritten; /* Number of bytes written (returned) */ PSZ PrinterName; /* Printer name string */ USHORT CodePage; /* Code Page to make active */ USHORT FontID; /* Font ID to make active */ USHORT SFN; /* System File Number */ ULONG 0; /* Reserved, set to zero */ USHORT rc; /* return code */
MASM
EXTRN DosPFSActivate:FAR INCL_DOSPFS EQU 1 PUSH@ DWORD SplHandle ;Temporary Spool File handle PUSH@ DWORD BytesWritten ;Number of bytes written (returned) PUSH@ ASCIIZ PrinterName ;Printer name string PUSH WORD CodePage ;Code Page to make active PUSH WORD FontID ;Font ID to make active PUSH WORD SFN ;System File Number PUSH DWORD 0 ;Reserved (must be zero) CALL DosPFSActivate Returns WORD