title: Tesseract 3 (OCR) - .NET Wrapper
body: <p><a href="http://code.google.com/p/tesseractdotnet/" rel="noreferrer">http://code.google.com/p/tesseractdotnet/</a></p>
  
  <p>I am having a problem getting Tesseract to work in my Visual Studio 2010 projects. I have tried console and winforms and both have the same outcome. I have come across a dll by someone else who claims to have it working in <code>VS2010</code>:</p>
  
  <p><a href="http://code.google.com/p/tesseractdotnet/issues/detail?id=1" rel="noreferrer">http://code.google.com/p/tesseractdotnet/issues/detail?id=1</a></p>
  
  <p>I am adding a reference to the dll which can be found in the attached to post 64 from the website above. Every time I build my project I get an <code>AccessViolationException</code> saying that an attempt was made to read or write protected memory.</p>
  
  <pre><code>public void StartOCR()
  {
      const string language = "eng";
      const string TessractData = @"C:\Users\Joe\Desktop\tessdata\";
  
      using (TesseractProcessor processor = new TesseractProcessor())
      {
          using (Bitmap bmp = Bitmap.FromFile(fileName) as Bitmap)
          {
              if (processor.Init(TessractData, language, (int)eOcrEngineMode.OEM_DEFAULT))
              {
                  string text = processor.Recognize(bmp);
              }
          }
      }
  }
  </code></pre>
  
  <p>The access violation exception always points to <code>if (processor.Init(TessractData, language, (int)eOcrEngineMode.OEM_DEFAULT))</code>. I've seen a few suggestions to make sure the solution platform is set to <code>x86</code> in the configuration manager and that the tessdata folder location is finished with trailing slash, to no avail. Any ideas?</p>