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 : Thursday, December 23, 2010 7:33:36 AM(UTC)
jclements

Groups: Registered
Posts: 12


You can view this document properly formatted at http://www.jnjsoftware.c...-delphi-vector-library/, but the LeadTools forums removed all my newlines.

LeadTools 16.5 to 17 upgrade path for Delphi, Vector Library
The v17 upgrade path was not as quick as in prior upgrades, normally just an install, re-compile and distribution of new DLLs was all that was required but several changes were made in this version of the source code that requires changes to get it to work, and I have not found any documentation on all the changes, the following are just the ones I was able to find in our use of the toolkit, which is probably not as involved as others, so sorry if your compiling issues are not resolved here.
1. Uses statement changes
First and foremost, all the unit names have changed. In previous versions all you needed to include in your uses statements were 3 PAS files, Ltdlldef, Ltdlltyp and Ltdllunt. This is no longer the case, all the functions have been broken up into individual units. In my application alone this went up to 12 files (Ltlck, LTDLLUnt, Lterr, Lttyp, Ltfil, Ltfil_f, Ltkrn, Lvkrn, Lvkrn_f, Ltkrn_f, Ltimgclr_f, Ltdis_f). If you count the actual .PAS files in the Uses sub-folder of your LeadTools installation you will see it went from 4 up to 102, so substantial changes were made in the structure of the package. Not saying they weren’t needed, but some documentation would have been nice.
Thankfully Delphi still comes with ol’ faithful GREP, so this will be helpful in finding the files you need to include.
2. VECTORPOLYLINE and VECTORPOLYGON have gone missing
For those enumerating through a vector files objects, you may have seen these types come up a time or two. They correspond to the Object type constants VECTOR_POLYLINE and VECTOR_POLYGON. These two structures have been renamed to VECTORCURVEOPENED (the old VECTORPOLYLINE) and VECTORCURVEOPENED (the old VECTORPOLYGON). The type constants have remained the same names however, which added to some confusion on my part initially.
3. VECTORxxx structure _Object field renamed to uObject

Also for those who enumerated through objects, you were used to the _Object variable contained within each vector structure that corresponded to the basic entity data. This field has been renamed to a less clunky uObject.

4. VECTORPEN changes
The VECTORPEN structure used to have a Pen field that was a EXTLOGPEN type. This has been renamed to uPenUnion and is now a union structure containing both a LOGPEN and EXTLOGPEN. Basically, when your old call to the color of the Pen would have been VECTORLINE.Pen.Pen.elpColor for instance, it is now VECTORLINE.Pen.uPenUnion.uExtLogPen.elpColor.
5. Vector Library unlock code
Although I was given a brand new v17 unlock code string to pass to L_UnlockSupport, I received -400 (ERROR_VECTOR_NOT_ENABLED) when making any vector calls. I had to use my 16.5 unlock code string to enable vector functionality on my development machine. I also have both 16.5 and 17 versions of LeadTools installed on this machine. However when the new exe was distributed, it did not work on that machine, I had to put back the v17 unlock code string, making it no longer work on my machine. I’m most likely going to have to rename the directory the v16.5 DLLs are in to make it work on my machine simultaneously as the clients machine.
I hope this list helps some of you get up and running as quickly as possible in v17!
 

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 : Sunday, December 26, 2010 2:34:58 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

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

Yes, the Delphi function and structure definitions (the USES folder contents) have been completely reworked.
The new definitions more closely resemble the C/C++ .H file contents, which means they're a little closer to the help file declarations than the old USES files.

For example, if you look at the old C vs. Pascal declarations for the VECTORPEN structure (comparing using v15 of LEADTOOLS), you will find that the C++ declaration contained a union:
//from v15 LVKRN.H==================================
typedef struct _VECTORPEN
{
   L_INT       nSize;                     // Size of this structure. Used for versioning.
   union
   {
      LOGPEN                  LogPen;                 // Windows LOGPEN structure defining the pen properties.
      EXTLOGPEN               ExtLogPen;              // Windows EXTLOGPEN structure defining the pen properties.

   }NewPen;
   DWORD       elpStyleEntry[7];
   L_BOOL      bExtPen;                  //If False LogPen
   
}VECTORPEN, *pVECTORPEN;
//end of v15 LVKRN.H==================================

However, the old Delphi declaration did not contain a union and only gave direct access to the EXTLOGPEN option.

About the unlock keys not working, please make sure to use the correct DLLs. The DLL names for v16 and v17 are similar, so it might be that your EXE is loading them from the wrong location. Check the Modules window in a Delphi debugging session or use the Windows Process Explorer or a similar utility to verify where the DLLs are loaded from. If you still face problems, send more details about the unlock key issue to support@leadtools.com

Note to all users: Please do NOT post unlock keys on the public forums.
 
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-2020, Yet Another Forum.NET
This page was generated in 0.240 seconds.