PFN_MAPPINGCALLBACKPROC callback function (elscore.h)

An application-defined callback function that asynchronously processes data produced by the MappingRecognizeText function. The MAPPINGCALLBACKPROC type defines a pointer to this callback function. MappingCallbackProc is a placeholder for the application-defined function name.

Syntax

PFN_MAPPINGCALLBACKPROC PfnMappingcallbackproc;

void PfnMappingcallbackproc(
  [in] _MAPPING_PROPERTY_BAG *pBag,
  [in] LPVOID data,
  [in] DWORD dwDataSize,
  [in] HRESULT Result
)
{...}

Parameters

[in] pBag

Pointer to a MAPPING_PROPERTY_BAG structure containing the results of the call to MappingRecognizeText.

[in] data

Pointer to private application data. This pointer is the same as that passed in the pRecognizeCallerData member of the MAPPING_OPTIONS structure.

[in] dwDataSize

Size, in bytes, of the private application data. This size is the same as that passed in the dwRecognizeCallerDataSize member of the MAPPING_OPTIONS structure when the application calls MappingRecognizeText asynchronously.

[in] Result

Return code from MappingRecognizeText. The return code is S_OK if the function succeeded, or an error code otherwise.

Return value

None

Remarks

A MappingCallbackProc function consumes the results retrieved by MappingRecognizeText. The application registers the callback function by passing its address to MappingRecognizeText in a MAPPING_OPTIONS structure.

The application should check the Result parameter before using the data in the pBag parameter. When it is done using the data from the property bag, the application must call MappingFreePropertyBag because the property bag can contain pointers into the original text. For more information about the property bag, see the remarks for the MAPPING_PROPERTY_BAG structure.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header elscore.h

See also

Extended Linguistic Services

Extended Linguistic Services Functions

MAPPING_OPTIONS

MAPPING_PROPERTY_BAG

MappingRecognizeText

Providing Callbacks for ELS Services