Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, December 12, 2006 4:12:59 PM(UTC)

DuckWon  
DuckWon

Groups: Registered
Posts: 5


Hello,

I'm upgrading our various projects to LeadTools 15 (from 14). I've swapped out the DLL's and removed the unlocking code (as that seems to be included now). But when I run an App, L_FileInfo returns "-9".

nRet = L_FileInfo(szFilename, &FileInfo, sizeof(FILEINFO), 0, NULL);

szFilename is of the type L_TCHAR and is populated with the correct path of an existing jpeg file. This code worked before the upgrade. The only thing I've changed here (in an attemp to fix the problem) was to change szFilename to L_TCHAR from TCHAR.

Any ideas why I keep getting this ERROR_FILE_FORMAT error?

Thanks in advance...

Duckwon

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, December 13, 2006 5:57:06 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)




Duckwon,


Error -9 means "Invalid File Format". One reason
this happens is failing to locate the LEADTOOLS file format DLLs, such as Lfcmp15u.dll and Lftif15u.dll.


In previous versions of LEADTOOLS, these files were
installed in the Windows SYS folder (SYSTEM or SYSTEM32). However, now you need
to copy them to your EXE's folder along with other needed DLL files. Did you do this?

 
#3 Posted : Wednesday, December 13, 2006 9:38:13 AM(UTC)

DuckWon  
DuckWon

Groups: Registered
Posts: 5


What I did was copy the files in 'LEAD Technologies\LEADTOOLS 15\Redist\API\Win32'to the folder with our EXE. Now I've copied in those two dlls and L_FileInfo is working. Of course, once I got past that code I ran into another bunch of errors. Are there other dlls I should be copying into the EXE's folder because of the new LeadTools 15?

For instance the constructor for 'struct_file_information' cannot be found. Another Engineer here thought that was a LeadTools object.

Duckwon
 
#4 Posted : Wednesday, December 13, 2006 3:27:58 PM(UTC)

DuckWon  
DuckWon

Groups: Registered
Posts: 5


I changed the DLLs in the EXE's folder so that it was just the newer version of the DLLs we had previously used.

'struct_file_information' is not in the LeadTools 15 version of ltfil.h. I beleave it was replaced by '_FILEINFO'(?). I replaced
'struct_file_information' with '_FILEINFO' and that bit of code started building. But then I got a ton more errors. The first involving 'L_FAR' which is no longer in lttyp.h. I didn't see either one these mentioned in the help's version history. Is there some place where these changes are noted? It would save me alot of time.
 
#5 Posted : Thursday, December 14, 2006 5:24:10 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)




struct_file_information was defined in version 14 and 14.5 of Ltfil.h, but it is not in v15 headers.


Please make sure that your project does not contain any
copies of header files from LEADTOOLS 14, and that all LEAD headers are referenced from the LEADTOOLS 15\Include folder.

 
#6 Posted : Thursday, December 14, 2006 9:21:33 AM(UTC)

DuckWon  
DuckWon

Groups: Registered
Posts: 5


Thanks Adnan, I've already done that. The problem is not that I'm using the wrong headers. The problem is that I keep running into types that are nolonger supported in LeadTools15. And as I can find no mention of these changes in the Help's version history, I am forced to try to figure out what has surplanted the now exstinct types. It would be nice to have some document which listed ALL the changes, saying something like " 'struct_file_information' is longer supported, use '_FILEINFO' instead". Such a document would make the upgrade to LeadTools15 much less painful.  ;)

If this document exists and I am just missing it, please let me know where to find it.

Thanks...

Duckwon
 
#7 Posted : Sunday, December 17, 2006 4:17:11 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)




Hello Duckwon,




I don't think you should be using
"struct_file_information" in 14 or "_FILEINFO" in 15 to
begin with, because these are structure tags, and the actual data type
documented in our help files for both versions 14 and 15 is called "FILEINFO".




In other words, the normal approach is to use the FILEINFO data type, which has the same name in LEADTOOLS 14 and 15.


There are changes from 14.5 to 15, and they are documented
in the help topic "Changes from Version 14.5 to Version 15" in the Version History section of the help file.

In this particular case, the change is not documented because it's internal change.

 
#8 Posted : Tuesday, December 19, 2006 1:10:38 PM(UTC)

DuckWon  
DuckWon

Groups: Registered
Posts: 5


Thanks for explaining that Adnan. I was upgrading code that was written by someone else and I was focused more on just changing versions rather than fixing the code. I see what you are saying and I'm fixing it now.

Thanks again...

Duckwon
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.082 seconds.