Here is my code snippet
Code: Select all
Dim templateImageID As Integer
Dim anchorTemplateID As Integer
Dim anchor_left As Integer = 0
Dim anchor_top As Integer = 0
Dim anchor_width As Integer = 0
Dim anchor_height As Integer = 0
Dim accuracy As Double = 0
Dim Mode As GdPicture.OMRMode = GdPicture.OMRMode.FavorSpeed
templateImageID = oGdPictureImaging.CreateGdPictureImageFromFile("d:\mypath\answer_sheet_template.png")
anchorTemplateID = oGdPictureImaging.CreateAnchorTemplate(templateImageID, 101, 101, 65, 71)
Dim anchorStatus As Integer = oGdPictureImaging.FindAnchor(scanImageID, templateImageID, Mode, 0, 0, 700, 700, anchor_left, anchor_top, anchor_width, anchor_height, accuracy)
Code: Select all
[AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.]
al.GDPICTUREOMR_Anchor(IntPtr A_0, IntPtr A_1, Int32 A_2, Int32 A_3, Int32 A_4, Int32 A_5, Int32 A_6, Int32 A_7, Int32 A_8, Int32 A_9, Int32& A_10, Int32& A_11, Int32& A_12, Int32& A_13, Double& A_14, Int32 A_15) +0
GdPicture.GdPictureImaging.FindAnchor(Int32 ImageID, Int32 AnchorTemplateID, OMRMode Mode, Int32 SearchLeft, Int32 SearchTop, Int32 SearchWidth, Int32 SearchHeight, Int32& PosLeft, Int32& PosTop, Int32& PosWidth, Int32& PosHeight, Double& Accuracy) +249
score.Page_Load(Object s, EventArgs e) +531
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
Thanks in advance,
Bryan