gpi12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
GpiErrorSegmentData (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPICONTROL
 
LONG GpiErrorSegmentData(hps, pidSegment, plContext)
HPS hps;             /* presentation-space handle          */
PLONG pidSegment;    /* address of segment identifier      */
PLONG plContext;     /* address of variable for error type */
 
The GpiErrorSegmentData function returns information about the last error
that occurred while drawing a segment. The function copies the segment
identifier and error type to the variables pointed to by pidSegment and
plContext, then returns either a byte offset or an element pointer position,
depending on the type of error.
 
Parameter   Description
────────────────────────────────────────────────────────────────────────────
 
hps         Identifies the presentation space.
 
pidSegment  Points to a variable to receive the identifier of the segment
            causing the error.
 
plContext   Points to a variable to receive the error type. It can be one of
            the following values:
 
            Value         Meaning
            ────────────────────────────────────────────────────────────────
            GPIE_DATA     A graphics order in the buffer for the GpiPutData
                          function caused an error. The return value is the
                          byte offset from the beginning of the buffer to
                          this graphics order.
 
            GPIE_ELEMENT  A graphics order in the buffer for the GpiElement
                          function caused an error. The return value is the
                          byte offset from the beginning of the buffer to
                          this graphics order.
 
            GPIE_SEGMENT  An element in the given segment caused an error.
                          The return value is the position of the element
                          pointer for this element.
 
Return Value
 
The return value is either a byte offset or an element pointer position if
the function is successful. Otherwise, it is GPI_ALTERROR.
 
Errors
 
Use the WinGetLastError function to retrieve the error value, which may be
one of the following:
 
     PMERR_INV_HPS
     PMERR_INV_MICROPS_FUNCTION
     PMERR_PS_BUSY
 
See Also
 
GpiCloseSegment, GpiElement, GpiOpenSegment, GpiPutData, WinGetLastError