Board index » delphi » bpw --> 32bit app?

bpw --> 32bit app?

Hello everybody!

Over past 10 years I have developed a TP -> BPx ->Delphi 1.0
application that is currently being sold commercialy
(www.softmath.com, if you want to take a look), consisting
of appx. 70K lines of code. Currently the program is fine under
 Win 3.1/9x as a (very stable) 16 bit application. My problem is
of course, Windows 2000. When I ran it under Windows NT it
promptly crashed, so I am suspecting that the same will happen
under W2000. Although the software is currently working with
Delphi  1.0, it is really a pure BPW application - it uses
TWindows and other classes that can not be intermixed  with
Delphi classes. The other problem are 16 bit API calls that need
to be converted into 32 calls. I have been postponing this step of
converting to a 32 bit application mainly because of the code size,
but now I don't see any other alternative. I will appreciate any
suggestion that anybody might have on how to convert this 16
bit monster into a 32-bit one. Any automatic converters of bpw
objects, API calls out there ? Anything I can think of seems to
require at least one year of heavy duty development work that
I am not ready to put it (the program is not selling that well!).
This program has been developed (part time) over a period of
10 years, and although there are virtually no bugs in it, there
is a lot of  'midnight code' in there; I am not looking forward
to rewriting it (i.e. putting the core code in DLLs and redoing
the GUI, which is quite complex).Finally , a really stupid question,
to which I am sure that the answer is NO :  does Windows
2000 provide some kind of "win 9x box" (like MS DOS box
we used to have in win 9x)  that would run *any* 16 bit code ?
I just had to ask.

Thank you for any suggestion that you might have.
It might save me year(s??) worth of work.

Neven

 

Re:bpw --> 32bit app?


To the best of my knowledge - there is no "magic bullet" that will allow you
to convert 16-bit code to 32-bit code. To get a 32-bit environment, you
would have to do the following:

1. Convert any obsolete Win16 APIs in OWL or your code to the newer Win16
APIs (e.g. replace MoveTo with MoveToEx). These APIs correspond to Win32
calls.
2. Convert any assembly-language code that may be present to 32-bit.
3. Review the rest of your code for assumptions regarding the size of an
Integer (16-bit vs. 32-bit). You may need to replace certain instances of
'Integer' with 'Word'.

(In C - this would be even more difficult. Imagine dealing with 'near'
pointers, 'far' pointers etc!)

I would test the program again after eliminating the obsolete Win16 calls.
It may start working again as a Win16 program. :-)

Good luck!

--
Daniel Pfeffer
--------------
Remove 'nospam' from my address in order to contact me directly

Quote
Neven Jurkovic <softm...@texas.net> wrote in message

news:381A8FF2.4F99@texas.net...
Quote
> Hello everybody!

> Over past 10 years I have developed a TP -> BPx ->Delphi 1.0
> application that is currently being sold commercialy
> (www.softmath.com, if you want to take a look), consisting
> of appx. 70K lines of code. Currently the program is fine under
>  Win 3.1/9x as a (very stable) 16 bit application. My problem is
> of course, Windows 2000. When I ran it under Windows NT it
> promptly crashed, so I am suspecting that the same will happen
> under W2000. Although the software is currently working with
> Delphi  1.0, it is really a pure BPW application - it uses
> TWindows and other classes that can not be intermixed  with
> Delphi classes. The other problem are 16 bit API calls that need
> to be converted into 32 calls. I have been postponing this step of
> converting to a 32 bit application mainly because of the code size,
> but now I don't see any other alternative. I will appreciate any
> suggestion that anybody might have on how to convert this 16
> bit monster into a 32-bit one. Any automatic converters of bpw
> objects, API calls out there ? Anything I can think of seems to
> require at least one year of heavy duty development work that
> I am not ready to put it (the program is not selling that well!).
> This program has been developed (part time) over a period of
> 10 years, and although there are virtually no bugs in it, there
> is a lot of  'midnight code' in there; I am not looking forward
> to rewriting it (i.e. putting the core code in DLLs and redoing
> the GUI, which is quite complex).Finally , a really stupid question,
> to which I am sure that the answer is NO :  does Windows
> 2000 provide some kind of "win 9x box" (like MS DOS box
> we used to have in win 9x)  that would run *any* 16 bit code ?
> I just had to ask.

> Thank you for any suggestion that you might have.
> It might save me year(s??) worth of work.

> Neven

Other Threads