Kanade's Delphi Stuff
Delphi Tips, Sample code and Tools
Copyright © 1997-2004, Sanjay Kanade
 
  Tips and Tricks on Delphi
Please read the DISCLAIMER before you use any of the tips from this web site. Go to main index
  Delphi Tips: In praise of Delphi
Tip 40:  I use Delphi for all my products
(modified: 09 Jan 2002)


Tip 55:  How my 16-bit product lives on with the help of Delphi!
(modified: 09 Jan 2002)


Tip 31:  The coming of age of Delphi
(modified: 13 Jan 2001)


  40: I use Delphi for all my products
Date added/modified: 09 Jan 2002

I used C++ and OWL-1 to develop my old 16-bit products. I loved it! But, then Borland changed OWL so much that I kept postponing the move to 32-bit. It would have required huge effort to convert the stuff to OWL-2.

Had I used Delphi 1 for my 16-bit products, it would have been easier to move to 32-bit. I chanced upon Delphi 3 in 1997. As a pilot product, I developed ShowSize as a GUI version of my earlier command line utility with the same name. Since then, there has been no looking back. I absolutely love Delphi. Now, all my products are in Delphi. Even HelpHikes Pro (a 16-bit product) uses Delphi DLLs to work like a 32-bit program! See my other note in this section.

In my contract development work, I may still develop in C++. Some clients demand it. If they must use C++, I usually try to convince them to use C++ Builder (another product from Borland that is as good as Delphi). But, for my own products, I prefer Delphi. Somehow, I have come to like the easier syntax of Object Pascal with no need to worry about -> or . qualifiers as in C++. The string handling is also much more easier in Delphi. Then, there are interfaces which are missing in C++.

Delphi for Linux (Kylix) has already been released. It is sure to make life easier for all those Linux developers. You can get more details on Kylix from borland.com web site.

  55: How my 16-bit product lives on with the help of Delphi!
Date added/modified: 09 Jan 2002

I have been away for a while, busy in my development projects. Recently, I debated porting my 16-bit help authoring product HelpHikes Pro to 32-bits. It was developed in Borland C++ and it would have been too much effort to redevelop it from scratch.

I was about to give it up when I discovered the thunking calls in Win32. I used to think that thunking is pretty complicated. It is not--if you devote some time to understanding the docs. I was able to develop a set of 32-bit DLL and EXE subprograms in Delphi that gave a new face to my HelpHikes Pro product. If you run it, you can't believe that it is a 16-bit product. It took quite some research but the end product is great! It runs even on Windows XP without any problems.

To give you an idea, I used the call CallProc32W as documented in Win32 help file. I put lot of long file name utility functions in my 32-bit Delphi DLL. I had already designed HelpHikes Pro to support long file names in Windows 95 even under 16-bit. That was a wise decision. It helped me interface with my DLL much quicker than I thought. I could not put File opening functions in the DLL due to some technical problems. With thunking, the DLL does not seem to keep the context of the current directory. Hence, I had to put them in a Delphi EXE utility that communicates with HelpHikes Pro through an INI file. It works like a charm.

Now, I will be able to extend HelpHikes Pro through Delphi anytime! It is great to know that Microsoft still supports 16-bit apps in Windows XP. You don't have to throw away old gems that you created in 16-bit. Just study the CallProc32W in detail.

  31: The coming of age of Delphi
Date added/modified: 13 Jan 2001

Please read Leo Singh's article, "The coming of age of Delphi."



 

Copyright 1995-2004, Sanjay Kanade. All rights reserved.
All trademarks and copyrights belong to their respective owners.