Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

LBitmap.Load returns error -2041
Started by jjwalters at 06-11-2008 10:32. Topic has 3 replies.

Print Search « Previous Thread Next Thread »
  06-11-2008, 10:32
jjwalters is not online. Last active: 9/26/2008 1:58:49 PM jjwalters

Top 200 Posts
Joined on 06-11-2008
Posts 14
LBitmap.Load returns error -2041
Reply Quote
The following returns an error -2041.
This error number is not listed - any ideas what it means and how to fix it?

<code>
<br>
bool FileConvert::convert(const char *filename)<br>
{<br>
    L_INT lSuccess = SUCCESS;<br>
    if(filename)<br>
    {<br>
        LBitmap lb2;<br>
        lb2.SetFileName((L_TCHAR *)filename);<br>
        lSuccess = lb2.Load(0);<br>
    }<br>
    return (lSuccess == SUCCESS);<br>
}<br>
</code>
<br>
Jordan
   Report 
  06-11-2008, 15:31
Adnan Ismail is not online. Last active: 10/14/2008 3:53:46 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,269
Re: LBitmap.Load returns error -2041
Reply Quote
This error means "ltfil dll not loaded". Did you load LEADTOOLS library DLLs at run-time to your application using the LSettings::LoadLibraries function? If not, please try to add this code to your application:

L_INT nRet = LSettings::LoadLibraries(LT_KRN | LT_FIL);
Adnan Ismail
LEADTOOLS Technical Support

   Report 
  06-12-2008, 3:56
jjwalters is not online. Last active: 9/26/2008 1:58:49 PM jjwalters

Top 200 Posts
Joined on 06-11-2008
Posts 14
Re: LBitmap.Load returns error -2041
Reply Quote
Yes. That did the trick. I should have mentioned that I'm using LeadTools v15, so I ended up calling LBase::LoadLibraries(LT_KRN | LT_FIL);
But thank you for such a speedy and accurate response.
As a matter of interest: where is error -2041 documented. Or are the chm's that come with L15 a little behind?
Jordan
   Report 
  06-12-2008, 13:41
Adnan Ismail is not online. Last active: 10/14/2008 3:53:46 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,269
Re: LBitmap.Load returns error -2041
Reply Quote
You can find the meaning of the error codes in the LtcWrpEr.h header file. The file is located under this path:
LEADTOOLS15\INCLUDE\ClassLib\LtcWrpEr.h
Adnan Ismail
LEADTOOLS Technical Support

   Report 
Post
LEAD Support Fo... » Developer » File Formats » LBitmap.Load returns error -2041

Powered by Community Server, by Telligent Systems