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!