Visual Basic (Declaration) | |
---|---|
Public Delegate Function RasterDocumentRecognizeStatusCallback( _ ByVal pageIndex As Integer, _ ByVal code As RasterDocumentExceptionCode _ ) As Boolean |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public delegate bool RasterDocumentRecognizeStatusCallback( int pageIndex, RasterDocumentExceptionCode code ) |
Managed Extensions for C++ | |
---|---|
public: __gc __delegate bool RasterDocumentRecognizeStatusCallback( int pageIndex, RasterDocumentExceptionCode code ) |
C++/CLI | |
---|---|
public delegate bool RasterDocumentRecognizeStatusCallback( int pageIndex, RasterDocumentExceptionCode code ) |
Parameters
- pageIndex
- Specifies the index for the recognized page.
- code
- Specifies the error value.
Visual Basic | Copy Code |
---|---|
Public Function RasterDocument_RecognizeStatus(ByVal pageIndex As Integer, ByVal code As RasterDocumentExceptionCode) As Boolean |
C# | Copy Code |
---|---|
public bool RasterDocument_RecognizeStatus(int pageIndex, RasterDocumentExceptionCode code) |
This event is invoked after each page is recognized, by calling the Recognize method. It reports the recognized page index along with the error code (status) that was returned by the recognition process.
To enable using this event, call EnableEvents. To disable using this event, call DisableEvents.
When you create a RasterDocumentRecognizeStatusCallback delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate.
Delegates are similar to the method pointers of C++ and have two main uses: performing callbacks, and defining events. Delegates are defined at run time.
Callback methods allow asynchronous processing: the method being called starts a thread and returns, during which time the thread does most of the work and calls the callback only when needed.
Events use a publish and subscribe type pattern. A class 'publishes' an event and any number of classes can 'subscribe' to that event. The runtime notifies subscribers when an event occurs.
Delegates that are used in defining events must be defined as taking two arguments: a publisher object, and an event information object (derived from the .NET EventArgs class).
For more information, refer to Recognizing Document Pages.Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family