Re:16-bit to 32-bit conversion
Quote
> I have several in-house written C dlls. They are written in standard
> Ansi C, using the Borland C++ version 4.51 environment. What do I need
> to change to convert them from 16-bit dlls to 32-bit dlls? I have
> searched for any helpful documents or books, but I have found nothing.
Structure packing and default integer sizes will be your biggest problems. Ints
are, almost by definition, 16 bits (2 bytes) in the 16 bit world, and 32 bits (4
bytes) in the 32 bit world. This should only matter in structures that are
saved to disk, if you are concerned with supporting older save files. Ditto with
structure packing, which is a problem when you move to any new compiler.
You may also have problems with the code itself compiling, as the standard
has changed some over the years. But for straight ANSI C code, the port shouldn't
be bad at all.
Also, 32 bit DLLs have a complete different entry mechanism than do 16 bit DLLs.
They only have one entry point (DllMain):
BOOL WINAPI DllMain (HANDLE hInst,
ULONG ul_reason_for_call,
LPVOID lpReserved)
and there is no more WEP exit point.
+===================================================+
| Jonathan Arnold (mailto:jdarn...@buddydog.org) |
| http://www.buddydog.org |
+===================================================+
It never occurs to a boy that he will some day be as
dumb as his father. -- Dr. Laurence J. Peter