ImageGear for C and C++ on Windows v19.3 - Updated
IG_REC_UD_get
API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > User Dictionary Functions > IG_REC_UD_get

Gets the name of the current User dictionary and its default section.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_UD_get(
   LPSTR pFilename,
   AT_INT iSize1,
   LPSTR pDefaultSection,
   AT_INT iSize2
);

Arguments:

Name Type Description
pFilename LPSTR Pointer to a buffer to get the name of the current User dictionary. If there is no User dictionary specified, an empty string is returned.
iSize1 AT_INT Length of the buffer for the name of the User dictionary.
pDefaultSection LPSTR Pointer to a buffer to get the name of the current default section name. If there is no default section specified, an empty string is returned, signaling that the first section of the User dictionary is the default section.
iSize2 AT_INT Length of the buffer for the default section. The length of each section name never exceeds AM_MAX_UD_SECTION_NAME_LEN characters (including the terminating zero).

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

This function does not process image pixels.

Example:

 
Copy Code
AT_ERRCOUNT ErrCount = 0;
AT_INT iNameSz = 1024;
LPSTR lpszName = (LPSTR) malloc(iNameSz);
AT_INT iSectSz = AM_MAX_UD_SECTION_NAME_LEN;
LPSTR lpszSect = (LPSTR) malloc(iSectSz);
ErrCount += IG_REC_UD_get(lpszName, iNameSz, lpszSect, iSectSz);
free(lpszName);
free(lpszSect);