Note that there are some explanatory texts on larger screens.

plurals
  1. POWhich configuration do I need to use an external DLL in a WinForms application?
    primarykey
    data
    text
    <p>I'm working with an external DLL to consume an OCR device using a wrapper written by me. I have made tests on the wrapper and it works perfectly. But, when I use a WinForms project to consume the client class of the wrapper (located an another project), an error arises when calling C# methods imported from the DLL (using <code>[DLLImport(...)]</code>) saying that the DLL is not registered. </p> <p>The error says: </p> <blockquote> <p>"DLL Library function no found. Check registry install path."</p> </blockquote> <p>All executions have been made in debug mode. I've compared both projects configuration. The most relevant difference is that Test project is oriented to Any CPU and WinForms app only points to x86.</p> <p>What could it be? </p> <p><strong>Updates</strong></p> <ol> <li>I've tried to register the dll using <code>Regsvr32.exe</code> but it didn't work. I thought about using <code>Gacutil.exe</code> but it required to uninstall all frameworks beyond .net framework 1.1...</li> <li>I was wondering... at testing environment probably everything works well because testing framework has its dll's or executable files (or something like that) totally registered in windows, so those are trusted dlls. It is possible that debug generated dlls are not trusted by windows and therefore this problem arises? </li> <li>I've created a form in the same troubling project and then I call the OCRWrapper from a button I've added to it. The OCR's worked!!. Unfortunately, it is difficult to rewrite the first form because we have invested a lot of hours in it; so, I'm still wondering what do I need to change in the troubling form...</li> <li>I started again the form's development from scratch and added all the components related to it; everything worked well, the OCR read succesfully all data. When I loaded a combo box using a call to an <code>ObjectContext</code> and the error appeared again... I'm using an entity framework connected to Oracle.</li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload