lpDllVfyStruct - OCR for AnyDoc - Foundation 23.1 - Foundation 23.1 - AnyDoc - external

OCR for AnyDoc Programming Reference Guide

Platform
AnyDoc
Product
OCR for AnyDoc
Release
Foundation 23.1
License

lpDllVfyStruct is a pointer to a tagDLLVFYSTRUCT that contains the following information for all actions.

  • lpDllVfyStruct->nDllVfyStructSize: The size of the structure can be used to compare the size of your custom DLL's defined structure with the size of a defined structure being passed by OCR for AnyDoc. This will serve to protect the custom verification DLL from having a version mismatch with OCR for AnyDoc.

  • lpDllVfyStruct->pszFamilyName: pszFamilyName is a pointer to a null terminated string that contains the name of the Form Family being processed.

  • lpDllVfyStruct->pszBatchName: pszBatchName is a pointer to a null terminated string that contains the batch number being processed.

  • lpDllVfyStruct->pszTemplateName: pszTemplateName is a pointer to a null terminated string that contains the master form template name being processed.

  • lpDllVfyStruct->pszImageFileName: pszImageFileName is a pointer to a null terminated string that contains the fully qualified path and filename of the current image.

  • lpDllVfyStruct->pszImportFileName: pszImportFileName is a pointer to a null terminated string that contains the fully qualified original import path and file name of the image.

  • lpDllVfyStruct->nSequence: nSequence contains the batch sequence number of the current image.

  • lpDllVfyStruct->nTotalImages: nTotalImages contains the total number of images in this batch.

  • lpDllVfyStruct->nTotalZones: nTotalZones contains the total number of zones for the current master form template.

  • lpDllVfyStruct->nTotalLines: nTotalLines contains the total number of lines in the current zone.

  • lpDllVfyStruct->nVerificationPhase: nVerificationPhase contains the current DLL phase as defined above.

  • lpDllVfyStruct->rLineRect: This RECT structure defines the coordinates of the upper- left and lower-right corners of the rectangle on the image that contains the current line being passed to the custom DLL.

    1. leftSpecifies the x-coordinate of the upper-left corner of the rectangle.

      topSpecifies the y-coordinate of the upper-left corner of the rectangle.

      rightSpecifies the x-coordinate of the lower-right corner of the rectangle.

      bottomSpecifies the y-coordinate of the lower-right corner of the rectangle.

  • lpDllVfyStruct->pQuesChars: pQuesChars is a pointer to an array of bytes that either have a 0 or a 1. A zero (0) has a value of not questionable and one (1) has a value of questionable. This array has a length of the current value of lpDllVfyStruct->pszText and each value corresponds to the character at the same index within that member variable.

  • lpDllVfyStruct->prCharRects: prCharRects is a pointer to an array of RECT structures that define the coordinates of the upper-left and lower-right corners of the rectangle of the indexed questionable character on the image that contains the current line being passed to the custom DLL. The pointer can be accessed as follows:

    1. LPRECT lpRect;

      lpRect=(LPRECT)lpDllRuleStruct>prCharRects+(nIndex*(sizeof(RECT)));

  • lpDllVfyStruct->nNumQuesChars: nNumQuesChars contains the total number of questionable characters in the current line being passed to the custom DLL.

  • lpDllVfyStruct->pszZoneName: On entry, pszZoneName contains a pointer to a null terminated string that contains the name of the current zone being passed to the DLL.

    pszZoneName can be modified to contain a different zone name on return and used when the variable lpDllVfyStruct->nCommand is set to a value of CDLL_GOTO_ZONE_NAME in order to go to a specific zone. Copy a new string to the current pointer. Do not change the pointer to point to a new address.

  • lpDllVfyStruct->nZoneNumber: On entry, nZoneNumber contains the number of the current zone being passed to the DLL.

    nZoneNumber can be modified to contain a different zone number on return and used when lpDllVfyStruct->nCommand is set to CDLL_GOTO_ZONE_NUMBER to go to a specific zone.

  • lpDllVfyStruct->nLineNumber: On entry, nLineNumber contains the number of the current line of the current zone being passed to the DLL.

    nLineNumber can be modified to contain a different line number on return and used when lpDllVfyStruct->nCommand is set to CDLL_GOTO_LINE_NUMBER to go to a specific zone.

  • lpDllVfyStruct->pszText: On entry, pszText contains a pointer to a null terminated string that contains the value of the current line of the current zone being passed to the DLL.

    pszText can be modified to contain a different value if desired and use one of the lpDllVfyStruct->nStatus flags to change the line or insert new lines. Copy a new string to the current pointer. Do not change the pointer to point to a new address.

    Note:

    This member cannot be modified for a Mark Sense Zone.

  • lpDllVfyStruct->nDllMessage: The verification DLL can use the variable to store information for later calls to DLLVfyLinePhase(), DLLMsgLinePhase(), or DLLRuleLinePhase().

    For example, the nDllMessage number could be used to store what type of violation has occurred or, if you are using resource strings, to set the number of the string to be displayed when DLLMsgLinePhase() is called. OCR for AnyDoc does nothing with this value other than store it.

  • lpDllVfyStruct->nStatus: On return from the DLL, the nStatus variable describes any status changes that need to be communicated by the DLL to OCR for AnyDoc. It must contain one of the Custom DLL Line Status Flags defined in the supplied header file VFYCUST.H.

    On entry this variable has no use.

    • CDLL_UNCHANGED: The value of lpDllVfyStruct->pszText is OK; it contents are returned unmodified (default).

    • CDLL_FLAGGED: The value of lpDllVfyStruct->pszText is incorrect and requires custom rule interaction. This insures that the line in question is stopped for interactive editing in the OCR for AnyDoc verifier and that DLLMsgLinePhase is called.

      OCR for AnyDoc will remove additional information that is questionable from the line. The value of lpDllVfyStruct->pszText may be modified on return.

    • CDLL_MODIFIED: The value of lpDllVfyStruct->pszText was modified or is OK and will not be brought up for interactive editing in the verification phase unless the user moves to this line.

      OCR for AnyDoc will remove additional questionable information from the line. The value of lpDllVfyStruct->pszText may be modified on return.

    • CDLL_MODIFIED_DISABLE: The value of lpDllVfyStruct->pszText was modified or is OK and will not be brought up for interactive editing in the OCR for Forms verifier unless the user navigates to this line. Then it is READ-ONLY.

      OCR for AnyDoc will remove additional questionable information from the line. The value of lpDllVfyStruct->pszText may be modified on return.

    • CDLL_MODIFIED_HIDE: The value of lpDllVfyStruct->pszText was modified or is OK and will not be brought up for interactive editing in the verification phase even if the user navigates to this line.

      OCR for AnyDoc will remove additional questionable information from the line. The value of lpDllVfyStruct->pszText may be modified on return.

    • CDLL_FLAGGED_UNCHANGED: The value of lpDllVfyStruct->pszText is incorrect and requires custom rule interaction. This insures that the line in question is stopped for interactive editing in the verification phase and that DLLMsgLinePhase is called.

      Note:

      Additional questionable information is not removed from the line. The value of lpDllVfyStruct->pszText may not be modified by the DLL.

    • CDLL_INSERT_BEFORE: The value of lpDllVfyStruct->pszText is inserted before the current line.

    • CDLL_INSERT_AFTER: The value of lpDllVfyStruct->pszText is inserted after the current line.

    • CDLL_RECHECK_RULE: The value of lpDllVfyStruct->pszText was modified and will not be brought up for interactive editing in the verification phase unless other form definition rules are broken on this line.

      OCR for AnyDoc will remove additional questionable information from the line. The value of lpDllVfyStruct->pszText may be modified on return.

  • lpDllVfyStruct->nCommand: On return from the DLL, the nCommand variable describes the navigation command to be performed by OCR for AnyDoc on the current zone list or to signal completion of DLL modifications. It must contain one of the Custom DLL Navigation Operations defined in the supplied header file VFYCUST.H.

    On entry this variable has no use.

    • CDLL_GOTO_NEXT_LINE: Pass the next line from the current image to the custom DLL. This can be called repeatedly to move through the entire image one line at a time.

    • CDLL_GOTO_PREV_LINE: Pass the previous line from the current image to the custom DLL. This can be called repeatedly to move through the entire image one line at a time.

    • CDLL_GOTO_NEXT_ZONE: Pass the first line of the next zone from the current image to the custom DLL. This can be called repeatedly to move through the entire image one zone at a time.

    • CDLL_GOTO_PREV_ZONE: Pass the first line of the previous zone from the current image to the custom DLL. This can be called repeatedly to move through the entire image one zone at a time.

    • CDLL_STAY_AT_LINE: Pass the last line used to the custom DLL. You can use this to avoid confusion when inserting lines or deleting lines.

    • CDLL_GOTO_TOP: Pass the first line of the first zone from the current image to the custom DLL. This is where the first call to the DLL at each phase starts.

    • CDLL_GOTO_BOTTOM: Pass the last line of the last zone from the current image to the custom DLL.

    • CDLL_GOTO_LINE_NUMBER: Go to the line number within the current zone identified in the member variable lpDllVfyStruct->nLineNumber.

    • CDLL_GOTO_ZONE_NUMBER: Go to the first line of the zone identified in the member variable lpDllVfyStruct->nZoneNumber.

    • CDLL_GOTO_ZONE_NAME: Go to the first line of the zone identified in the member variable lpDllVfyStruct->pszZoneName.

    • CDLL_FINISHED: The custom DLL is finished with its modifications and is passing control back to OCR for AnyDoc.

    • CDLL_DELETE_IMAGE: The custom DLL is finished with its modifications and is passing control back to OCR for AnyDoc. The current image should be deleted and the associated job removed.

    • CDLL_CANCEL_VERIFICATION: The custom DLL is finished with its modifications and is passing control back to OCR for AnyDoc. This will cancel out of verification. This has the same effect as pressing the Cancel button in the Verifier. The current job is preserved.

  • lpDllVfyStruct->nReturnStatus: This variable contains one of the Custom DLL Error Codes defined in the supplied header file VFYCUST.H. It describes the status of the last issued DLL operation (combination of lpDllVfyStruct->nCommand and lpDllVfyStruct->nStatus).

    • CDLL_OPERATION_SUCCESSFUL: The last operation was successful.

    • CDLL_UNKNOWN_COMMAND: The lpDllVfyStruct->nCommand returned by the custom DLL is not one of the defined values.

    • CDLL_INVALID_LINE_NUMBER: A CDLL_GOTO_NEXT_LINE command was issued and the line number was not valid.

    • CDLL_INVALID_ZONE_NUMBER: A CDLL_GOTO_ZONE_NUMBER command was issued and the zone number was not valid.

    • CDLL_INVALID_ZONE_NAME: A CDLL_GOTO_ZONE_NAME command was issued and the zone name was not valid.

    • CDLL_NO_PREVIOUS_LINES: A CDLL_GOTO_PREV_LINE command was issued and there are no previous lines on the page.

    • CDLL_NO_MORE_LINES: A CDLL_GOTO_NEXT_LINE command was issued and there are no more lines on the page.

    • CDLL_NO_PREVIOUS_ZONES: A CDLL_GOTO_PREV_ZONE command was issued and there are no previous zones on the page.

    • CDLL_NO_MORE_ZONES: A CDLL_GOTO_NEXT_ZONE command was issued and there are no more zones on the page.

    • CDLL_UNKNOWN_STATUS: The lpDllVfyStruct->nStatus returned by the custom DLL is not one of the defined values.