Export (0) Print
Expand All

MappingCallbackProc callback function

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


void CALLBACK MappingCallbackProc(
  _In_  MAPPING_PROPERTY_BAG *pBag,
  _In_  LPVOID data,
  _In_  DWORD dwDataSize,
  _In_  HRESULT Result
);

Parameters

pBag [in]

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

data [in]

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

dwDataSize [in]

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 asynchronuously.

Result [in]

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

Return value

This callback function does not return a value.

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

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Elscore.h

See also

Extended Linguistic Services
Extended Linguistic Services Functions
Providing Callbacks for ELS Services
MAPPING_OPTIONS
MAPPING_PROPERTY_BAG
MappingRecognizeText

 

 

Community Additions

ADD
Show:
© 2014 Microsoft