L_OcrSettingManager_GetEnumValueAsString

#include "ltocr.h"

L_LTOCR_API L_INT EXT_FUNCTION L_OcrSettingManager_GetEnumValueAsString(settingManager, settingName, value)

L_OcrSettingManager settingManager; handle to the OCR engine setting manager
const L_TCHAR* settingName; unique setting name
L_TCHAR** value; pointer to string buffer to update

Gets the current value of an enum setting as string.

Parameter Description
settingManager Handle to the OCR engine setting manager.
settingName Name of the setting you wish to get its integer value. This is the value you retrieved with a call to L_OcrSettingManager_GetSettingName method.
value Pointer to string buffer to update, declare a variable of type L_TCHAR* and pass its address and the engine will allocate the necessary buffer for you. You have to call L_OcrMemory_Free after you are done with this buffer to free the allocated memory.

Returns

SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

Gets the current value of an enum setting as string.

This method returns the value as string, if the enum is not a flag enum type (the value of L_OcrSettingDescriptor.EnumIsFlags of the L_OcrSettingDescriptor for this setting is false), then the string value of the enum setting is returned (The enum member friendly names can be obtained with L_OcrSettingDescriptor.EnumMemberFriendlyNames).

If the enum is a flag enum type (the value of L_OcrSettingDescriptor.EnumIsFlags of the L_OcrSettingDescriptor for this setting is true), then the string value of the setting is the friendly names of the flagged set separated by a comma.

The string enum values are case-sensitive.

To get or set the value of an enum setting as unsigned integer, use L_OcrSettingManager_GetEnumValue and L_OcrSettingManager_SetEnumValue.

The settingName setting must be an "enum" type setting, otherwise; this method will return an error. To get the type of a setting along with other information such as its friendly name and range use the L_OcrSettingManager_GetSettingDescriptor method.

To set the value of an enum setting, use L_OcrSettingManager_SetEnumValue.

You can also set the value of any setting from a string (where the string will be converted to a compatible type) using L_OcrSettingManager_SetValue. To get the value of any setting as a string, use L_OcrSettingManager_GetValue. Note that settings of type L_OcrSettingValueType_BeginCategory and L_OcrSettingValueType_EndCategory have no values and will return an error if you try to get or set their values.

Advantage OCR engine contain specific additional features and functionality that can be queried and updated using different L_OcrSettingManager handle functions.

You can use the different methods of the L_OcrSettingManager handle to get and set the engine-specific settings. Each setting has a unique name (a string value). You can get all the settings available to the current OCR engine through the L_OcrSettingManager_GetSettingName method. The L_OcrSettingManager_GetSettingDescriptor and L_OcrSettingManager_GetSettingDescriptors methods returns a description of the setting (its type, friendly name and value range), you can then use the various setting get and set methods to query and change the value of a certain setting. For example, if the setting type is L_OcrSettingValueType_Integer, you can use the L_OcrSettingManager_GetIntegerValue to get the current value of the setting and the L_OcrSettingManager_SetIntegerValue to change its value. Refer to L_OcrEngine_GetSettingManager for a complete example.

Note: You have to call L_OcrMemory_Free after you are done with this buffer to free the allocated memory.

Required DLLs and Libraries

LTOCR
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.
Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Advantage OCR C API Help