Partager via


GET_PS_FEATURESETTING Printer Escape function

The GET_PS_FEATURESETTING printer escape function retrieves information about a specified feature setting for a PostScript driver.

This escape function is supported only if the PostScript driver is in PostScript-centric mode or in GDI-centric mode. To set the PostScript driver mode, call the POSTSCRIPT_IDENTIFY escape function.

To perform this operation, call the ExtEscape function with the following parameters.

Syntax

int ExtEscape(
  _In_  HDC    hdc,
  _In_  int    nEscape,
  _In_  int    cbInput,
  _In_  LPCSTR lpszInData,
  _In_  int    cbOutput,
  _Out_ LPSTR  lpszOutData
);

Parameters

  • hdc [in]
    A handle to the printer device context.

  • nEscape [in]
    The escape function to be performed.

    Value Meaning
    GET_PS_FEATURESETTING

    Gets information on a specified feature setting for a PostScript driver.

     

  • cbInput [in]
    The number of bytes of data pointed to by the lpszInData parameter.

    For this escape, set this value to sizeof ( INT ).

  • lpszInData [in]
    A pointer to the INT variable that contains a feature setting value from the following table.

    Windows XP and later versions of Windows support the private use of this parameter. For private use, you can use the numbers in the range from FEATURESETTING_PRIVATE_BEGIN to FEATURESETTING_PRIVATE_END. Private parties that intend to use numbers in this range should contact Microsoft first to avoid conflicts with other applications.

    Value Meaning
    FEATURESETTING_CUSTPAPER

    Retrieves the custom paper parameters.

    Set cbOutput to sizeof ( PSFEATURE_CUSTPAPER ) and lpszOutData to point to a PSFEATURE_CUSTPAPER structure.

    FEATURESETTING_MIRROR

    Retrieves the mirrored output setting.

    Set cbOutput to sizeof ( BOOL ) and lpszOutData to point to a BOOL variable.

    If mirrored output is selected, the value returned in lpszOutData is TRUE.

    If mirrored output is not selected, the value returned in lpszOutData is FALSE

    FEATURESETTING_NEGATIVE

    Retrieves the negative output setting.

    Set cbOutput to sizeof ( BOOL ) and lpszOutData to point to a BOOL variable.

    When the function returns, the lpszOutData variable is TRUE if "Negative Output: Yes" is selected; otherwise, it is FALSE.

    FEATURESETTING_NUP

    Retrieves the N-Up setting of the page layout.

    Set cbOutput to sizeof ( BOOL ) and lpszOutData to point to a BOOL variable.

    If an N-Up page layout is not being used, the lpszOutData variable returns FALSE.

    If an N-Up page layout is being used, the lpszOutData variable returns TRUE. However, the variable does not indicate the format of the N-Up page layout or its semantics.

    FEATURESETTING_OUTPUT

    Retrieves information about PostScript driver output options.

    Set cbOutput to sizeof ( PSFEATURE_OUTPUT ) and lpszOutData to point to a PSFEATURE_OUTPUT structure.

    FEATURESETTING_PROTOCOL

    Retrieves the output protocol setting.

    Sets cbOutput to sizeof( INT ) and lpszOutData to point to an INT variable.

    When the function returns, the lpszOutData variable is set to one of the following output protocol values:

    PSPROTOCOL_ASCII PSPROTOCOL_BCP PSPROTOCOL_TBCP PSPROTOCOL_BINARY
    FEATURESETTING_PSLEVEL

    Retrieves the PostScript language level.

    Set cbOutput to sizeof ( INT ) and lpszOutData to point to an INT variable.

    When the function returns, the lpszOutData variable is set to 1, 2, 3, or higher to indicate the PostScript language level.

     

  • cbOutput [in]
    The number of bytes of data pointed to by the lpszOutData parameter.

  • lpszOutData [out]
    A pointer to the structure that receives output from this escape. This parameter must not be NULL if ExtEscape is called as a query function. If no data is to be returned in this structure, set cbOutput to 0.

Return value

The return value is greater than zero if the function is successful and less than zero if not. A return value of zero indicates that the printer does not support this escape.

Remarks

The GET_PS_FEATURESETTING printer escape function is valid if called any time after calling the CreateDC function and before calling the DeleteDC function.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

See also

Printing

GDI Printer Escape Functions

CreateDC

DeleteDC

ExtEscape

PSFEATURE_CUSTPAPER

PSFEATURE_OUTPUT