i try msdn sample to load dynamically assembly

Bitmap b = new Bitmap(@"d:\0.bmp");
Assembly a = Assembly.Load("tessnet2_32");
                Type myType = a.GetType("tessnet2.Tesseract");
                MethodInfo mymethod = myType.GetMethod("DoOCR");
                Object obj = Activator.CreateInstance(myType);
                mymethod.Invoke(obj, new object[] { b, Rectangle.Empty });
//exception here

but i get en exception
Exception has been thrown by the target of an invocation.
what is the problem?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tesseract-ocr?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to