IXpsOMGeometryFigure::GetSegmentTypes method (xpsobjectmodel.h)

Gets the types of segments in the figure.

Syntax

HRESULT GetSegmentTypes(
  [in, out] UINT32           *segmentCount,
  [in, out] XPS_SEGMENT_TYPE *segmentTypes
);

Parameters

[in, out] segmentCount

The size of the array that is referenced by segmentTypes (see below). This parameter must not be NULL.

If the method returns successfully, segmentCount will contain the number of elements that are returned in the array referenced by segmentTypes.

If segmentTypes is NULL when the method is called, segmentCount must be set to zero.

If a NULL pointer is returned in segmentTypes, the value of segmentCount will contain the required buffer size, specified as the number of elements.

[in, out] segmentTypes

An array of XPS_SEGMENT_TYPE values that has the same number of elements as specified in segmentCount. If the caller requires that only the specified buffer size be returned, set this value to NULL.

If the array is large enough, this method will copy the XPS_SEGMENT_TYPE values into the array and return, in segmentCount, the number of the copied values. If segmentTypes is NULL or references a buffer that is not large enough, a NULL pointer will be returned, no data will be copied, and segmentCount will contain the required buffer size, which is specified as the number of elements.

Return value

If the method succeeds, it returns S_OK; otherwise, it returns an HRESULT error code.

Return code Description
S_OK
The method succeeded.
E_POINTER
segmentCount is NULL.
ERROR_MORE_DATA
segmentTypes is NULL or references a buffer that is not large enough to receive the XPS_SEGMENT_TYPE data. segmentCount contains the required number of elements.

Remarks

For an example of how to use this method in a program, see the code example in GetSegmentData.

Requirements

Requirement Value
Minimum supported client Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header xpsobjectmodel.h

See also

GetSegmentCount

GetSegmentData

GetSegmentDataCount

IXpsOMGeometryFigure

XML Paper Specification

XPS Document Errors

XPS_SEGMENT_TYPE