Jump to content

GpiQueryTag: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
This function returns the current value of the tag identifier, as set by the [[GpiSetTag]] function.  
This function returns the current value of the tag identifier, as set by the [[GpiSetTag]] function.
 
==Syntax==
==Syntax==
  GpiQueryTag(hps, plTag)
  GpiQueryTag(hps, plTag)


==Parameters==
==Parameters==
; hps ([[HPS]]) - input
; hps ([[HPS]]) - input: Presentation-space handle.
: Presentation-space handle.
; plTag ([[PLONG]]) - output: Tag identifier.
 
; plTag ([[PLONG]]) - output
: Tag identifier.


==Return Value==
==Return Value==
; rc ([[BOOL]]) - returns
; rc ([[BOOL]]) - returns: Success indicator.
: Success indicator.
:: TRUE : Successful completion
:; TRUE
:: FALSE : Error occurred.
:: Successful completion
:; FALSE
:: Error occurred.


==Remarks==
==Remarks==
Line 23: Line 18:
==Errors==
==Errors==
Possible returns from WinGetLastError:
Possible returns from WinGetLastError:
; PMERR_INV_HPS (0x207F)
; PMERR_INV_HPS (0x207F): An invalid presentation-space handle was specified.
: An invalid presentation-space handle was specified.
; PMERR_PS_BUSY (0x20F4): An attempt was made to access the presentation space from more than one thread simultaneously.
; PMERR_PS_BUSY (0x20F4)
; PMERR_INV_MICROPS_FUNCTION (0x20A1): An attempt was made to issue a function that is invalid in a micro presentation space.
: An attempt was made to access the presentation space from more than one thread simultaneously.
; PMERR_INV_MICROPS_FUNCTION (0x20A1)
: An attempt was made to issue a function that is invalid in a micro presentation space.


==Example Code==
==Example Code==
<pre>
#define INCL_GPICORRELATION /* Or use INCL_GPI, INCL_PM, */
#include <os2.h>
HPS      hps;    /*  Presentation-space handle. */
PLONG    plTag;  /*  Tag identifier. */
BOOL    rc;    /*  Success indicator. */
rc = GpiQueryTag(hps, plTag);
</pre>
This function returns the current value of the tag identifier, as set by the GpiSetTag call.
This function returns the current value of the tag identifier, as set by the GpiSetTag call.
<pre>
<pre>
#define INCL_GPICORRELATION
#define INCL_GPICORRELATION
#include &lt;OS2.H&gt;
#include <os2.h>


HPS hps; /* Presentation-space handle. */
HPS hps; /* Presentation-space handle. */

Latest revision as of 21:41, 17 November 2025

This function returns the current value of the tag identifier, as set by the GpiSetTag function.

Syntax

GpiQueryTag(hps, plTag)

Parameters

hps (HPS) - input
Presentation-space handle.
plTag (PLONG) - output
Tag identifier.

Return Value

rc (BOOL) - returns
Success indicator.
TRUE : Successful completion
FALSE : Error occurred.

Remarks

This function is invalid when the drawing mode (see GpiSetDrawingMode) is set to retain.

Errors

Possible returns from WinGetLastError:

PMERR_INV_HPS (0x207F)
An invalid presentation-space handle was specified.
PMERR_PS_BUSY (0x20F4)
An attempt was made to access the presentation space from more than one thread simultaneously.
PMERR_INV_MICROPS_FUNCTION (0x20A1)
An attempt was made to issue a function that is invalid in a micro presentation space.

Example Code

This function returns the current value of the tag identifier, as set by the GpiSetTag call.

#define INCL_GPICORRELATION
#include <os2.h>

HPS hps; /* Presentation-space handle. */
LONG lTag; /* Tag identifier. */

GpiQueryTag(hps, &lTag);