Page 1 of 1

Error loading hunspelldll.dll :(

Posted: Fri Aug 19, 2016 1:55 pm
by alexandreq
Hello,

I have a directory named "dic", my application is in this directory:

c:\teachmenow3 and the "dic" directory is "c:\teachmenow3\dic"

My code identify the dll and call the method to load the dll, please, take a look:

Code: Select all

  if FileExists('dic\hunspelldll.dll') Then
  Begin
     RVHunSpell1.Dictionaries.Clear;
     RVHunSpell1.DllDir  := 'dic\';
     RVHunSpell1.DictDir := dic\';

     With RVHunSpell1.Dictionaries.Add Do Begin
        Load('en_us');
        if not Active then Begin
           Free;
        end;
     End;
  end;

when the method Load is called, I got an error at this part of your code:

DLLHandle := LoadLibrary(PChar(dllname));

this part is on the RVHunSpell.pas

in function LinkFunctions:boolean;

Why?
Thanks

Posted: Fri Aug 19, 2016 3:12 pm
by Sergey Tkachenko
I tried this code, and it works for me.

Where is the error exactly? Is DLLHandle = 0 after calling LoadLibrary?
Or may be DLLHandle is ok, but LinkFunctions returns False?

Posted: Fri Aug 19, 2016 3:50 pm
by alexandreq
This error happens exactly in this line:

DLLHandle := LoadLibrary(PChar(dllname));

was the dll compiled ? Changed?

the date of the dll is 27/05/2006

thanks for your reply

Posted: Fri Aug 19, 2016 4:49 pm
by Sergey Tkachenko
What do you mean by "error"?
It returns 0, or something different?

Do you compile the project in 32 bit?
What version of HunSpell dll do you use?
What if you try a dll from http://www.trichview.com/resources/thir ... elldll.zip ?