ImageGear Professional DLL v17.1 for Windows Accusoft
IG_REC_UD_item_delete
Send Feedback  
ImageGear Professional DLL v17.1 for Windows > API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > User Dictionary Functions > IG_REC_UD_item_delete

Glossary Item Box

Deletes a word from the user dictionary currently opened for editing by the IG_REC_UD_edit_open function.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_UD_item_delete(
   LPCSTR pSection,
   LPCWSTR pUDitem,
   enumIGRecUDItemAttribute itemattrib
);

Arguments:

pSection Name of the section from where the item should be deleted.
pUDitem Pointer to a UNICODE string containing the word to be deleted. (The string is terminated with a double zero.)
itemattrib Attribute for the UDitem to be deleted.

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.

Remarks:

The item to be deleted is specified together with the pUDitem and itemattrib parameters and is searched under the pSection section only.

  1. When the characters to be deleted are contained in the ANSI (1252) Code Page, the easiest way to define the pUDitem string is with a wide-character-string literal, L"characters". If any needed character falls outside the ANSI (1252) Code Page, you can convert these characters one after each other with the IG_REC_util_codepage_to_unicode utility function, which converts a single character code from the current single-byte Code Page value (IG_REC_output_codepage_set) to its UNICODE representation.
  2. When in the pSection there are two pUDitem items (with the same name, but with different attributes), the itemattrib parameter will select the required one to be deleted.
  3. Deleting the last UDitem from a section causes the section to be removed automatically from the User dictionary.

Example:

  Copy Code
AT_ERRCOUNT ErrCount = 0;
ErrCount += IG_REC_UD_set(NULL, NULL);
ErrCount += IG_REC_UD_edit_open();

ErrCount += IG_REC_UD_item_add("SampleSection", L"[A-Z]", IG_REC_UD_ITEM_ATTR_LITERAL_STRING);
ErrCount += IG_REC_UD_item_add("SampleSection", L"[A-Z]", IG_REC_UD_ITEM_ATTR_REGULAR_EXPRESSION);
ErrCount += IG_REC_UD_item_delete("SampleSection", L"[A-Z]", IG_REC_UD_ITEM_ATTR_LITERAL_STRING);

ErrCount += IG_REC_UD_edit_close();

©2012. Accusoft Corporation. All Rights Reserved.