Page 24 - DCAP408_WEB_PROGRAMMING
P. 24

Windows Programming




                    Notes
                                                      Figure 1.1: Steps in Creating a DOS Program




                                                                    Source Code
                                                                   (Example .C)







                                                                    C Compiler







                                                                   Objective file
                                                                   (Example .OBJ)







                                                                      Linker







                                                                   Finished Program
                                                                    (Example .EXE)






                                   Figure 1.2 shows a flow diagram for the creation of a Windows programs. In this figure the
                                   source code file gets converts to objective file from the compilers same as in the DOS. In windows
                                   programs the linker gets a few  additional information  from a  small file called the  "module
                                   definition file" with the file name extension ".DEF". This file tells the linker how to assemble the
                                   program. The linker combines the module definition  file information  and the  object file to
                                   make an unfinished .EXE file. The unfinished .EXE file lacks the resource data.
                                   The main difference between Windows programs and DOS programs is in the compilation of
                                   the resource data file with the extension of ".RES". In DOS programs there is no resource data but
                                   in windows program the resource data is added to the unfinished.EXE file to create the finished
                                   executable program. The resource data is basically stuck onto the end of the program's code and
                                   becomes part of the programs file. In addition to adding the resource data the resource compiler
                                   writes the Windows version number into the program file.








          18                                LOVELY PROFESSIONAL UNIVERSITY
   19   20   21   22   23   24   25   26   27   28   29