home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / INSTALL.ZIP / EXAMPLE.H < prev    next >
Text File  |  1990-01-11  |  4KB  |  100 lines

  1.  
  2. /*
  3.  *                      Example Install Include File
  4.  */
  5.  
  6.  
  7. /*
  8.  *                              Includes
  9.  */
  10.  
  11.  
  12. #define   PMREL1_1                                  /* Defined Rel 1.1 only   */
  13. #define   INCL_WIN                                  /* Window definitions     */
  14. #define   INCL_GPI                                  /* GPI definitions        */
  15. #define   INCL_ERRORS                               /* Error code definitions */
  16. #define   INCL_DOSMISC                              /* 1.2 DosError prototype */
  17. #define   INCL_DOSQUEUES                            /* 1.1 DosError prototype */
  18. #define   INCL_DOSPROCESS                           /* Dos thread definitions */
  19.  
  20. #include  <os2.h>                                   /* OS/2 definitions       */
  21. #include  <string.h>                                /* C string definitions   */
  22.  
  23.  
  24. /*
  25.  *                          Local Prototypes
  26.  */
  27.  
  28.  
  29. VOID    ControlThread(VOID);
  30. BOOL    CopyFile(PSZ, PSZ) ;
  31. SHORT   AddProgram(PSZ, PSZ, PCH, PSZ, HPROGRAM) ;
  32. MRESULT EXPENTRY StatusWndProc( HWND, USHORT, MPARAM, MPARAM) ;
  33. MRESULT APIENTRY CrtDirDlgProc(HWND, USHORT, MPARAM, MPARAM);
  34. USHORT  DisplayMsg(  USHORT, SHORT);
  35. VOID    RemoveSysItems(HWND);
  36.  
  37.  
  38. /*
  39.  *                             Defines
  40.  */
  41.  
  42.                 /* String table keyword defines  */
  43.  
  44. #define   MSG001         1
  45. #define   MSG002         2
  46. #define   MSG003         3
  47. #define   MSG004         4
  48. #define   MSG005         5
  49. #define   MSG006         6
  50. #define   MSG007         7
  51. #define   MSG008         8
  52. #define   MSG009         9
  53.  
  54.  
  55. #define   WM_INSTALL     WM_USER                    /* Start install message  */
  56. #define   MAXSTRSIZE     150                        /* Maximum string size    */
  57. #define   MAXMSGSIZE     100                        /* Maximum message size   */
  58. #define   BUFFSIZE       6                          /* Copy data buffer size  */
  59. #define   INFOSIZE       5                          /* Group data buffer size */
  60. #define   STACK_SIZE     2000                       /* Thread stack size      */
  61. #define   IDC_OK         1                          /* Dialog box OK response */
  62. #define   IDC_CANCEL     2                          /* Dialog box cancel      */
  63. #define   IDC_HELP       3                          /* Dialog box HELP        */
  64. #define   IDDLG_CRTDIR   10                         /* Dialog box ID          */
  65. #define   IDC_DIRPATH    11                         /* Dialog box input field */
  66.  
  67.  
  68. /*
  69.  *                            Variables
  70.  */
  71.  
  72.  
  73. HAB  vhab ;                                         /* Anchor bar handle      */
  74. HWND vhwndClient ;                                  /* Client window  handle  */
  75. HWND vhwndFrame ;                                   /* Window frame handle    */
  76. CHAR vszCopyFrom[MAXSTRSIZE];                       /* Copy from status string*/
  77. CHAR vszCopyTo[MAXSTRSIZE];                         /* Copy to status string  */
  78. CHAR vszClass[] = "SampleInstall" ;                 /* Class name             */
  79. CHAR vszTitle[] = "Application Installation" ;      /* Window title           */
  80. UCHAR vStack[STACK_SIZE];                           /* Control thread stack   */
  81.  
  82.            /* Group program information data buffer.  */
  83. CHAR vszProgInfo[INFOSIZE][MAXSTRSIZE] = {
  84.                                          "Example Group"    ,
  85.                                          "Sample Program"   ,
  86.                                          "\\SAMPLE.EXE"     ,
  87.                                          "/r /b "           ,
  88.                                          "C:\\SAMPLE"
  89.                                          };
  90.  
  91.            /* Copy information data buffer.  */
  92. CHAR vszCmdData[BUFFSIZE][MAXSTRSIZE] = {
  93.                                         "A:\\DATAFILE.FIL"  ,
  94.                                         "\\DATAFILE.FIL"    ,
  95.                                         "A:\\HELPFILE.HLP"  ,
  96.                                         "\\HELPFILE.HLP"    ,
  97.                                         "A:\\SAMPLE.EXE"    ,
  98.                                         "\\SAMPLE.EXE"
  99.                                         };
  100.