More about 16 bit DP4 Windows Applications

Linking a Convertible DP4 Windows Application

If you choose to make a convertible application, you will not be able to call the Microsoft Windows functions directly, although you can call those contained in the DP4 file WINCALL.H if you use Metaware C. We strongly recommend that you build programs that call Windows functions as native Windows applications rather than convertible applications.

A DP4 DOS executable can be converted to a Windows application using EXE2OS2:

EXE2OS2 -WINDOWS application name

This will produce a file with the extension .WIN. This distinguishes it from the pre-conversion .EXE file. Windows requires a .EXE extension, so copy or rename the .WIN file to a file with a .EXE extension. You will have to run the resource compiler against to make it executable

In summary, you can use the DP4 facilities as follows (with either Metaware or Microsoft C):

DP4LINK /c progname (link convertible program)
EXE2OS2 -windows progname (convert to Windows format)
RC -k progname (add resources)

You can use any version of the Microsoft linker. Your application is linked with the DOS version of the libraries when using Microsoft C.

You should build an .RC file for each program, as described later. You can eliminate the need to run RC by specifying an additional command tail, −FONT, to EXE2OS2.

MS-DOS Executables linked prior to DP4 version 4.500 must be relinked because the root code used then is not compatible with MCUMMY.WIN or HCDUMMY.WIN.

Building a Native 16 bit Windows Application

There are two methods of building a native DP4 Windows application:

The Module-Definition File

DP4 supplies a Microsoft module-definition file named DP4WIN.DEF as part of its Programming Tools Pack. It is used when linking a native Windows program using the DP4-supplied batch files QABLINK.BAT or DP4LINK.BAT. If you wish to use a different module-definition file, you should note the following: