Jump to content

GpiOpenSegment

From EDM2
Revision as of 00:33, 3 April 2025 by Iturbide (talk | contribs)

Syntax

GpiOpenSegment(hps, lSegment)

Parameters

hps (HPS) - input
Presentation-space handle.
lSegment (LONG) - input
Segment identifier.
Must be zero or a positive number.

Returns

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

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_SEG_NAME (0x20C8)
       An invalid segment identifier was specified. 
PMERR_INV_MICROPS_FUNCTION (0x20A1)
       An attempt was made to issue a function that is invalid in a micro presentation space. 
PMERR_ALREADY_IN_SEG (0x2004)
       An attempt was made to open a new segment while an existing segment bracket was already open. 
PMERR_PATH_INCOMPLETE (0x20EC)
       An attempt was made to open or close a segment either directly or during segment drawing, or to issue GpiAssociate while there is an open path bracket. ;PMERR_AREA_INCOMPLETE (0x2005)
       One of the following has occurred: o A segment has been opened, closed, or drawn.
       o GpiAssociate was issued while an area bracket was open.
       o A drawn segment has opened an area
       bracket and ended without closing it.
PMERR_INV_MODE_FOR_REOPEN_SEG (0x20A5)
       An attempt was made to reopen an existing segment while the drawing mode was set to DM_DRAW or DM_DRAWANDRETAIN. 
PMERR_DYNAMIC_SEG_ZERO_INV (0x2029)
       An attempt was been made to open a dynamic segment with a segment identifier of zero. 
PMERR_INV_MODE_FOR_OPEN_DYN (0x20A4)
       An attempt was made to open a segment with the ATTR_DYNAMIC segment set, while the drawing mode was set to DM_DRAW or DM_DRAWANDRETAIN. ;PMERR_UNCHAINED_SEG_ZERO_INV (0x2108)
       An attempt was made to open segment with segment identifier zero and the ATTR_CHAINED segment attribute not specified.