---
name: "XpQueryVersion"
section: "3"
platform: "linux"
package: "libxp"
version: "1.0.4-3"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/XpQueryVersion"
---

# XpQueryVersion(3)

Queries an X Server to determine if it supports the X Print Service Extension, and if it does, which version of the X Print Service Extension.

## NAME

XpQueryVersion - Queries an X Server to determine if it supports the X Print Service Extension, and if it does, which version of the X Print Service Extension.

## SYNOPSIS

      cc \[ flag... \] file... -lXp \[ library... \]\
\
       \#include \<X11/extensions/Print.h\>

**Status XpQueryVersion** ( *display,* *major\_version\_return,* *minor\_version\_return* )\
\
       Display \**display*;\
\
       short \**major\_version\_return*;\
\
       short \**minor\_version\_return*;

## ARGUMENTS

- *display*

  Specifies a pointer to the Display structure; returned from XOpenDisplay.

- *major\_version\_return*

  Returns the major version if the X Print Service Extension exists, else zero.

- *minor\_version\_return*

  Returns the minor version if the X Print Service Extension exists, else zero.

## DESCRIPTION

XpQueryVersion determines if the X Print Service Extension is present. A non-zero Status is returned if the extension is supported, otherwise a zero Status is returned. If the extension is supported, the major and minor version numbers are returned to indicate the level of X Print Service Extension support.

The X Print Service Extension is initialized on the first call to any X Print Service function; there is no need to explicitly initialize the X Print Service Extension.
