Board index » delphi » Converting a 16 bit application to 32 bit

Converting a 16 bit application to 32 bit

We are moving a rather large (several million lines) 16 bit application to 32 bit.  It was developed with Borland 4.53 and there are no plans to upgrade from that environment.  Does anyone know of any articles,  documentation or have a list of what pitfalls we might encounter.

The application's graphics are primarily a large spreadsheet updated via dialogue boxes.  The only outside vendor objects are RogueWave as far as I know.  Appreciate any help.  Thanks.

 

Re:Converting a 16 bit application to 32 bit


On 30 Oct 2001 07:23:47 -0800, "Dennis Bazant" <dpbaz...@up.com> wrote:

Quote
>moving a rather large (several million lines) 16 bit application to 32 bit.  
>... developed with Borland 4.53
>anyone know of any articles,  documentation or have a list of what pitfalls
>we might encounter.

A good place to start is with the porttool utility which came with that
compiler. I found it to be rather flaky - many errors when trying to run it.
But you can use it via the "Port", "Background" menu to examine
a source module for possible porting issues. It will add comments to
the source code silently, so be sure to use a copy. Check the source
module for any issues reported. A visual examination of the porttool.ini
file will reveal the things it's looking for.

You should also have a copy of the Online Books with that compiler.
(DynaText) Chapter 7 of the Programmer's Guide has a section on
"32-bit Windows programming", and on "Writing portable Windows code".

The Microsoft Developer Network web site should have articles on
converting from Win16 to Win32. Many textbooks have examples as
well.

One thing to bear in mind is that there are differences between the
various Win32 platforms as well. e.g. - Win95/98, WinNT/2K, WinME,
WinXP. These differences may affect your conversion, especially if
you expect to run your app on diverse Win32 platforms.

Keep in mind that 4.53 only (barely) supported Win95, and WinNT 3.x.
The Windows headers and import libs won't provide access to all of
the features added in later Win32 releases.

--
Wayne A. King
(ba...@torfree.net, wayne.k...@ablelink.org,
 wak...@idirect.com, Wayne_A_K...@compuserve.com)

Re:Converting a 16 bit application to 32 bit


Quote
Dennis Bazant <dpbaz...@up.com> wrote in message news:3bdec603$1_2@dnews...

> We are moving a rather large (several million lines) 16 bit application to

32 bit.  It was developed with Borland 4.53 and there are no plans to
upgrade from that environment.  Does anyone know of any articles,
documentation or have a list of what pitfalls we might encounter.

Quote
> <snip>

OTTOMH....

1. In 32-bit mode, the int type is 32-bit.  If you are working with any data
files that rely on this type, declare the ints used by them as short (to
force 16-bit integer) for compatibility.

2. If you are using OWL and BWCC, you need to make extra sure that you call
EnableBWCC() in your TApplication constructor, otherwise your dialogs won't
work properly.

3. Your compiler might be buggy when it comes to 32-bit stuff.  I think the
workaround is something to do with the _OWLPCH and _OWLALLPCH defines, as it
took me ages to figure out.

4. In Win32, you can't use the getdate, etc. functions defined in dos.h.
I'm not sure what 32-bit methods there are for this besides the TDate class.

There are most certainly other issues, but I'm not sure what.

Stewart.

--
My e-mail is valid but not my primary mailbox.
Please post replies on the 'group using Borland's server
(newsgroups.borland.com).
If you can't use Borland's server, then please reply by e-mail, as I will
not receive messages posted on other servers.

Other Threads