Jump to content

DosPFSQueryAct: Difference between revisions

From EDM2
Ak120 (talk | contribs)
Ak120 (talk | contribs)
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Description==
This call queries the active code page and font for the specified printer and system file number.
This call queries the active code page and font for the specified printer and system file number.


==Syntax==
==Syntax==
<PRE>
  DosPFSQueryAct (PrinterName, CodePage, FontID, SFN, Reserved)
  DosPFSQueryAct


    (PrinterName, CodePage, FontID, SFN, Reserved)
</PRE>
==Parameters==
==Parameters==
; PrinterName (PSZ) - input : Address of the name of the printer that queries the active code page and font.  
;PrinterName (PSZ) - input : Address of the name of the printer that queries the active code page and font.
 
;CodePage (PUSHORT) - output : Address of the active code page that returns the specified printer and System File Number.
; CodePage (PUSHORT) - output : Address of the active code page that returns the specified printer and System File Number.  
;FontID (PUSHORT) - output : Address of the active Font ID number that returns the specified printer and System File Number.
 
;SFN (USHORT) - input : System File Number of the requester. The SFN is passed as a parameter in the monitor packet.
; FontID (PUSHORT) - output : Address of the active Font ID number that returns the specified printer and System File Number.  
;Reserved (ULONG) - input : Reserved must be set to zero.
 
; 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==
==Return Code==
rc (USHORT) - return
;rc (USHORT) - return:Return values are:
 
*9 Code page switcher internal error.
Return values are:
*10 Invalid printer name as input.
 
*13 Received code page request when code page switcher not initialized.
* Code page switcher internal error.
*16 Received request for system file number not in the system file number table.
* 10   Invalid printer name as input.  
* 13   Received code page request when code page switcher not initialized.  
* 16   Received request for system file number not in the system file number table.


==Remarks==
==Remarks==
DosPFSQueryAct 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.
DosPFSQueryAct 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.


DosPFSQueryAct 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 regarding the import statement.  
DosPFSQueryAct 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 regarding the import statement.


==Example Code==
==Bindings==
===C Binding===
===C===
<PRE>
<PRE>
#define INCL_DOSPFS
#define INCL_DOSPFS
Line 41: Line 30:
USHORT  rc = DosPFSQueryAct(PrinterName, CodePage, FontID, SFN, Reserved);
USHORT  rc = DosPFSQueryAct(PrinterName, CodePage, FontID, SFN, Reserved);


PSZ             PrinterName;  /* Printer name string */
PSZ     PrinterName;  /* Printer name string */
PUSHORT         CodePage;      /* Code Page return */
PUSHORT CodePage;      /* Code Page return */
PUSHORT         FontID;        /* Font ID return */
PUSHORT FontID;        /* Font ID return */
USHORT           SFN;          /* System File Number */
USHORT   SFN;          /* System File Number */
ULONG           0;            /* Reserved, set to zero */
ULONG   0;            /* Reserved, set to zero */
 
USHORT          rc;            /* return code */


USHORT  rc;            /* return code */
</PRE>
</PRE>


===MASM Binding===
===MASM===
<PRE>
<PRE>
EXTRN  DosPFSQueryAct:FAR
EXTRN  DosPFSQueryAct:FAR
Line 65: Line 53:
Returns WORD
Returns WORD
</PRE>
</PRE>
==Related Functions==
*


[[Category:The OS/2 API Project]]
[[Category:Dos16]]

Latest revision as of 05:11, 26 January 2020

This call queries the active code page and font for the specified printer and system file number.

Syntax

DosPFSQueryAct (PrinterName, CodePage, FontID, SFN, Reserved)

Parameters

PrinterName (PSZ) - input
Address of the name of the printer that queries the active code page and font.
CodePage (PUSHORT) - output
Address of the active code page that returns the specified printer and System File Number.
FontID (PUSHORT) - output
Address of the active Font ID number that returns the specified printer and System File Number.
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 values are:
  • 9 Code page switcher internal error.
  • 10 Invalid printer name as input.
  • 13 Received code page request when code page switcher not initialized.
  • 16 Received request for system file number not in the system file number table.

Remarks

DosPFSQueryAct 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.

DosPFSQueryAct 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 regarding the import statement.

Bindings

C

#define INCL_DOSPFS

USHORT  rc = DosPFSQueryAct(PrinterName, CodePage, FontID, SFN, Reserved);

PSZ      PrinterName;   /* Printer name string */
PUSHORT  CodePage;      /* Code Page return */
PUSHORT  FontID;        /* Font ID return */
USHORT   SFN;           /* System File Number */
ULONG    0;             /* Reserved, set to zero */

USHORT   rc;            /* return code */

MASM

EXTRN  DosPFSQueryAct:FAR
INCL_DOSPFS         EQU 1

PUSH@  ASCIIZ  PrinterName   ;Printer name string
PUSH@  WORD    CodePage      ;Code Page return
PUSH@  WORD    FontID        ;Font ID return
PUSH   WORD    SFN           ;System File Number
PUSH   DWORD   0             ;Reserved (must be zero)
CALL   DosPFSQueryAct

Returns WORD