共用方式為


GetPropertyValue Method

GetPropertyValue Method

Returns the value of a specified property of the alternate. Use this to obtain property values for RecognitionProperty objects that have no corresponding helper property, such as the Confidence and LineNumber properties.

Declaration

[C++]

HRESULT GetPropertyValue (
    [in] BSTR propertyType,
    [out, retval] VARIANT *PropertyValue
);

[Microsoft® Visual Basic® 6.0]

Public Function GetPropertyValue( _
    propertyType As String _
) As Variant

Parameters

propertyType

[in] Specifies which property of the alternate to return, as one of the GUIDs from the RecognitionProperty object.

For more information about the BSTR data type, see Using the Automation Library.

PropertyValue

[out, retval] Returns the value of the property type as an array of bytes. The return value is interpreted differently for each property type.

RecognitionProperty Type Description
ConfidenceLevel CONFIDENCE_LEVEL enumeration type
HotPoint POINT
LineMetrics LATTICE_METRICS structure
LineNumber ULONG
MaximumStrokeCount Not used
PointsPerInch Not used
Segmentation Not a value, returns TPC_E_INVALID_PROPERTY
S_OK Success.

For more information about the VARIANT structure, see Using the Automation Library.

Return Value

HRESULT value Description
E_INK_EXCEPTION An exception occurred while processing.
E_POINTER A parameter contained an invalid pointer.
CO_E_CLASSSTRING Invalid GUID format.
E_FAIL An unspecified error occurred.
E_INVALIDARG The flag is invalid.
E_OUTOFMEMORY Cannot allocate memory to complete the operation.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example gets the LineMetrics property value from a IInkRecognitionAlternate object, theRecognitionAlternate.

Dim theLineMetrics() As Byte
theLineMetrics = theRecognitionAlternate.GetPropertyValue(LineMetrics)

Applies To