home *** CD-ROM | disk | FTP | other *** search
/ Home Edutainment Collection 5: Windows Games / Aztech-HomeEdutainmentCollection-Vol5-WindowsGames.iso / ffws1 / ffws.ms_ / ffws.ms
Text File  |  1993-06-16  |  16KB  |  539 lines

  1. '$INCLUDE 'setupapi.inc'
  2. '$INCLUDE 'msdetect.inc'
  3. '$INCLUDE 'mscpydis.inc'
  4.  
  5. ' Stuff for writing out private profile strings.
  6. Declare Function WritePrivateProfileString Lib "Kernel" (lpApplicationName As String, lpKeyName As String,lpString As String, lplFileName As String) As Integer
  7. DECLARE FUNCTION BitmapCntrlInit LIB "mscuistf.dll" as INTEGER
  8.  
  9. ''Dialog ID's
  10. CONST WELCOME      = 100
  11. CONST ASKQUIT      = 200
  12. CONST DESTPATH     = 300
  13. CONST EXITFAILURE  = 400
  14. CONST EXITQUIT     = 600
  15. CONST EXITSUCCESS  = 700
  16. CONST OPTIONS      = 800
  17. CONST APPHELP      = 900
  18. CONST BILLBOARD       = 4545
  19. CONST MODELESS     = 5000
  20. CONST CUSTINST     = 6200
  21. CONST TOOBIG       = 6300
  22. CONST BADPATH      = 6400
  23. 'CONST CDALREADYUSED = 7100
  24. 'CONST CDBADFILE     = 7200
  25. 'CONST CDCONFIRMED   = 7300
  26. 'CONST CDGETNAME     = 7400
  27. 'CONST CDBADNAME     = 7700
  28.  
  29. ''Bitmap ID
  30. CONST LOGO         = 1
  31.  
  32. ''File Types
  33. CONST APPFILES     = 1
  34. CONST OPTFILES1    = 2
  35. CONST OPTFILES2    = 3
  36.  
  37. GLOBAL DEST$        ''Default destination directory.
  38. GLOBAL WINDRIVE$    ''Windows drive letter.
  39. GLOBAL OPT1OPT$     ''Option selection from OptFiles1 option dialog.
  40. GLOBAL OPT2OPT$     ''Option selection from OptFiles2 option dialog.
  41.  
  42. ''CustInst list symbol names
  43. GLOBAL APPNEEDS$    ''Option list costs per drive
  44. GLOBAL OPT1NEEDS$
  45. GLOBAL OPT2NEEDS$
  46. GLOBAL SYSTEMFILENEEDS$
  47. GLOBAL EXTRACOSTS$  ''List of extra costs to add per drive
  48. GLOBAL BIGLIST$     ''List of option files cost calc results (boolean)
  49.  
  50. ''Dialog list symbol names
  51. GLOBAL CHECKSTATES$
  52. GLOBAL STATUSTEXT$
  53. GLOBAL DRIVETEXT$
  54. GLOBAL NAMEOUT$
  55.  
  56. DECLARE SUB AddOptFilesToCopyList (ftype%)
  57. DECLARE SUB RecalcOptFiles (ftype%)
  58. DECLARE SUB RecalcPath
  59. DECLARE SUB SetDriveStatus
  60. DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
  61.  
  62.  
  63. INIT:
  64.     CUIDLL$ = "mscuistf.dll"            ''custom user interface dll
  65.     HELPPROC$ = "FHelpDlgProc"          ''Help dialog procedure
  66.     INIFILE$ = "FFW.INI"
  67.  
  68.     SetBitmap CUIDLL$, LOGO
  69.     SetTitle "FFW Setup"
  70.  
  71.     szInf$ = GetSymbolValue("STF_SRCINFPATH")
  72.     IF szInf$ = "" THEN
  73.         szInf$ = GetSymbolValue("STF_CWDDIR") + "FFWSETUP.INF"
  74.     END IF
  75.     ReadInfFile szInf$
  76.  
  77.     WINDRIVE$ = MID$(GetWindowsDir, 1, 1)
  78.     DEST$ = WINDRIVE$ + ":\FANTASY"
  79.  
  80.     ''CustInst list symbols
  81.     CHECKSTATES$ = "CheckItemsState"
  82.     STATUSTEXT$  = "StatusItemsText"
  83.     DRIVETEXT$   = "DriveStatusText"
  84.     FOR i% = 1 TO 3 STEP 1
  85.         AddListItem CHECKSTATES$, "ON"
  86.     NEXT i%
  87.     FOR i% = 1 TO 3 STEP 1
  88.         AddListItem STATUSTEXT$, ""
  89.     NEXT i%
  90.     FOR i% = 1 TO 7 STEP 1
  91.         AddListItem DRIVETEXT$, ""
  92.     NEXT i%
  93.     ReplaceListItem DRIVETEXT$, 7, DEST$
  94.  
  95.     ''Disk cost list symbols
  96.     APPNEEDS$   = "AppNeeds"
  97.     OPT1NEEDS$  = "Opt1Needs"
  98.     OPT2NEEDS$  = "Opt2Needs"
  99.     EXTRACOSTS$ = "ExtraCosts"
  100.     BIGLIST$    = "BigList"
  101.     FOR i% = 1 TO 3 STEP 1
  102.         AddListItem BIGLIST$, ""
  103.     NEXT i%
  104.     FOR i% = 1 TO 26 STEP 1
  105.         AddListItem EXTRACOSTS$, "0"
  106.     NEXT i%
  107.  
  108.     ''File Option Variables
  109.     OPT1OPT$ = "1"
  110.     OPT2OPT$ = "1"
  111.  
  112.     RecalcPath
  113.     SetDriveStatus
  114.  
  115. '$IFDEF DEBUG
  116.     i% = SetSizeCheckMode(scmOnIgnore)    '' could use scmOff; def = scmOnFatal
  117. '$ENDIF ''DEBUG
  118.  
  119.     ' Initialize the copy disincentive routines.
  120.     result% = InitSystem(1, "", 0)
  121.  
  122. CUSTINST:
  123.     sz$ = UIStartDlg(CUIDLL$, CUSTINST, "FCustInstDlgProc", APPHELP, HELPPROC$)
  124.  
  125.     IF sz$ = "CONTINUE" THEN
  126.         ''Install only if it will fit.
  127.         FOR i% = 1 TO 3 STEP 1
  128.             IF GetListItem(BIGLIST$, i%) <> "" THEN
  129.                 GOSUB TOOBIG
  130.                 GOTO INSTALL
  131.             END IF
  132.         NEXT i%
  133.         UIPop 1
  134.         GOTO INSTALL
  135.     ELSEIF sz$ = "PATH" THEN
  136.         GOTO GETPATH
  137.     ELSEIF sz$ = "CHK1" THEN
  138.         RecalcOptFiles APPFILES
  139.         SetDriveStatus
  140.         GOTO CUSTINST
  141.     ELSEIF sz$ = "CHK2" THEN
  142.         RecalcOptFiles OPTFILES1
  143.         SetDriveStatus
  144.         GOTO CUSTINST
  145.     ELSEIF sz$ = "CHK3" THEN
  146.         RecalcOptFiles OPTFILES2
  147.         SetDriveStatus
  148.         GOTO CUSTINST
  149.     ELSEIF sz$ = "BTN2" THEN
  150.         GOTO OPTFILES1
  151.     ELSEIF sz$ = "BTN3" THEN
  152.         GOTO OPTFILES2
  153.     ELSEIF sz$ = "REACTIVATE" THEN
  154.         RecalcPath
  155.         SetDriveStatus
  156.         GOTO CUSTINST
  157.     ELSE
  158.         GOSUB ASKQUIT
  159.         GOTO CUSTINST
  160.     END IF
  161.  
  162. INSTALL:
  163.     ClearCopyList
  164.  
  165.     '*** i% = BitmapCntrlInit()
  166.     'AddToBillboardList CUIDLL$, BILLBOARD, "FModelessDlgProc", 1
  167.  
  168.     AddOptFilesToCopyList APPFILES
  169.     AddOptFilesToCopyList OPTFILES1
  170.     AddOptFilesToCopyList OPTFILES2
  171.     IF IsFileWritable(MakePath(GetWindowsSysDir(), "test.tmp")) = 1 THEN
  172.         RemoveFile MakePath(GetWindowsSysDir(), "test.tmp"), cmoForce
  173.         AddSectionFilesToCopyList "SystemFiles",  GetSymbolValue("STF_SRCDIR"), GetWindowsSysDir()
  174.     ELSE
  175.         AddSectionFilesToCopyList "SystemFiles",  GetSymbolValue("STF_SRCDIR"), DEST$ + "\football"
  176.     ENDIF
  177.     CreateDir DEST$, cmoNone
  178.     CopyFilesInCopyList
  179.  
  180.     IF GetListItem(CHECKSTATES$, APPFILES) = "ON" THEN
  181.         CreateProgmanGroup "Fantasy Software", "", cmoNone
  182.         ShowProgmanGroup  "Fantasy Software", 1, cmoNone
  183.         CreateProgmanItem "Fantasy Software", "Fantasy Football for Windows", MakePath(DEST$ + "\football","ffw.exe"), "", cmoOverwrite
  184.         CreateProgmanItem "Fantasy Software", "Technical Notes", "WRITE.EXE " + MakePath(DEST$ + "\football","technote.wri"), "", cmoOverwrite
  185.         CreateProgmanItem "Fantasy Software", "Read Me", "WRITE.EXE " + MakePath(DEST$ + "\football","readme.wri"), "", cmoOverwrite
  186.         CreateProgmanItem "Fantasy Software", "License Agreement", "WRITE.EXE " + MakePath(DEST$ + "\football","license.wri"), "", cmoOverwrite
  187.         CreateProgmanItem "Fantasy Software", "Extension Development", "WRITE.EXE " + MakePath(DEST$ + "\football","extdev.wri"), "", cmoOverwrite
  188.         result% = WritePrivateProfileString("User", "Path", MakePath(DEST$ + "\football","ffw.exe"), "ffw.ini")
  189.         result% = WritePrivateProfileString("Messaging", "CheckOnOpen", "1", "ffw.ini")
  190.         result% = WritePrivateProfileString("Display", "ActionBar", "1", "ffw.ini")
  191.         result% = WritePrivateProfileString("Display", "UseColor", "1", "ffw.ini")
  192.     END IF
  193.  
  194.     IF GetListItem(CHECKSTATES$, OPTFILES1) = "ON" THEN
  195.         'CreateProgmanItem "Fantasy Software", "PAS On-Line!", MakePath(DEST$ + "\pasline","pasline.exe"), "", cmoOverwrite
  196.     END IF
  197.  
  198.     IF GetListItem(CHECKSTATES$, OPTFILES2) = "ON" THEN
  199.         'CreateProgmanItem "Fantasy Software", "Extension Development Help", "winhelp " + MakePath(DEST$ + "\ext\help","pasext.hlp"), "", cmoOverwrite
  200.     END IF
  201.  
  202.     ' Close the copy disincentive system
  203.     CloseSystem "AppFiles", "1", DEST$ + "\football", 510, 500
  204.  
  205. QUIT:
  206.     ON ERROR GOTO ERRQUIT
  207.  
  208.     IF ERR = 0 THEN
  209.         dlg% = EXITSUCCESS
  210.     ELSEIF ERR = STFQUIT THEN
  211.         dlg% = EXITQUIT
  212.     ELSE
  213.         dlg% = EXITFAILURE
  214.     END IF
  215. QUITL1:
  216.     sz$ = UIStartDlg(CUIDLL$, dlg%, "FInfo0DlgProc", 0, "")
  217.     IF sz$ = "REACTIVATE" THEN
  218.         GOTO QUITL1
  219.     END IF
  220.     UIPop 1
  221.  
  222.     END
  223.  
  224. ERRQUIT:
  225.     i% = DoMsgBox("Setup sources were corrupted, contact PAS Software at (206) 788-7568", "Setup Message", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  226.     END
  227.  
  228.  
  229.  
  230. GETPATH:
  231.     SetSymbolValue "EditTextIn", DEST$
  232.     SetSymbolValue "EditFocus", "END"
  233. GETPATHL1:
  234.     sz$ = UIStartDlg(CUIDLL$, DESTPATH, "FEditDlgProc", APPHELP, HELPPROC$)
  235.  
  236.     IF sz$ = "CONTINUE" THEN
  237.         olddest$ = DEST$
  238.         DEST$ = GetSymbolValue("EditTextOut")
  239.  
  240.         ''Validate new path.
  241.         IF IsDirWritable(DEST$) = 0 THEN
  242.             GOSUB BADPATH
  243.             GOTO GETPATHL1
  244.         END IF
  245.         UIPop 1
  246.  
  247.         ''Truncate display if too long.
  248.         IF LEN(DEST$) > 23 THEN
  249.             ReplaceListItem DRIVETEXT$, 7, MID$(DEST$, 1, 23)+"..."
  250.         ELSE
  251.             ReplaceListItem DRIVETEXT$, 7, DEST$
  252.         END IF
  253.  
  254.         ''Recalc if path changed.
  255.         IF (olddest$ <> DEST$) AND (olddest$ <> DEST$+"\") AND (olddest$+"\" <> DEST$) THEN
  256.             RecalcPath
  257.             SetDriveStatus
  258.         END IF
  259.  
  260.         olddest$ = ""
  261.         GOTO CUSTINST
  262.     ELSEIF sz$ = "REACTIVATE" THEN
  263.         RecalcPath
  264.         SetDriveStatus
  265.         GOTO GETPATHL1
  266.     ELSEIF sz$ = "EXIT" THEN
  267.         GOSUB ASKQUIT
  268.         GOTO GETPATHL1
  269.     ELSE
  270.         UIPop 1
  271.         GOTO CUSTINST
  272.     END IF
  273.  
  274.  
  275.  
  276. OPTFILES1:
  277.     SetSymbolValue "RadioDefault", OPT1OPT$
  278. OPT1L1:
  279.     sz$ = UIStartDlg(CUIDLL$, OPTIONS, "FRadioDlgProc", APPHELP, HELPPROC$)
  280.     newopt$ = GetSymbolValue("ButtonChecked")
  281.  
  282.     IF sz$ = "CONTINUE" THEN
  283.         UIPop 1
  284.         IF newopt$ <> OPT1OPT$ THEN
  285.             OPT1OPT$ = newopt$
  286.             RecalcOptFiles OPTFILES1
  287.             SetDriveStatus
  288.         END IF
  289.         newopt$ = ""
  290.         GOTO CUSTINST
  291.     ELSEIF sz$ = "REACTIVATE" THEN
  292.         RecalcPath
  293.         SetDriveStatus
  294.         GOTO OPT1L1
  295.     ELSEIF sz$ = "EXIT" THEN
  296.         GOSUB ASKQUIT
  297.         GOTO OPT1L1
  298.     ELSE
  299.         UIPop 1
  300.         newopt$ = ""
  301.         GOTO CUSTINST
  302.     END IF
  303.  
  304.  
  305.  
  306. OPTFILES2:
  307.     SetSymbolValue "RadioDefault", OPT2OPT$
  308. OPT2L1:
  309.     sz$ = UIStartDlg(CUIDLL$, OPTIONS, "FRadioDlgProc", APPHELP, HELPPROC$)
  310.     newopt$ = GetSymbolValue("ButtonChecked")
  311.  
  312.     IF sz$ = "CONTINUE" THEN
  313.         UIPop 1
  314.         IF newopt$ <> OPT2OPT$ THEN
  315.             OPT2OPT$ = newopt$
  316.             RecalcOptFiles OPTFILES2
  317.             SetDriveStatus
  318.         END IF
  319.         newopt$ = ""
  320.         GOTO CUSTINST
  321.     ELSEIF sz$ = "REACTIVATE" THEN
  322.         RecalcPath
  323.         SetDriveStatus
  324.         GOTO OPT2L1
  325.     ELSEIF sz$ = "EXIT" THEN
  326.         GOSUB ASKQUIT
  327.         GOTO OPT2L1
  328.     ELSE
  329.         UIPop 1
  330.         newopt$ = ""
  331.         GOTO CUSTINST
  332.     END IF
  333.  
  334.  
  335.  
  336. TOOBIG:
  337.     sz$ = UIStartDlg(CUIDLL$, TOOBIG, "FInfo0DlgProc", 0, "")
  338.     IF sz$ = "REACTIVATE" THEN
  339.         RecalcPath
  340.         SetDriveStatus
  341.         GOTO TOOBIG
  342.     END IF
  343.     UIPop 1
  344.     RETURN
  345.  
  346.  
  347.  
  348. BADPATH:
  349.     sz$ = UIStartDlg(CUIDLL$, BADPATH, "FInfo0DlgProc", 0, "")
  350.     IF sz$ = "REACTIVATE" THEN
  351.         RecalcPath
  352.         SetDriveStatus
  353.         GOTO BADPATH
  354.     END IF
  355.     UIPop 1
  356.     RETURN
  357.  
  358.  
  359.  
  360. ASKQUIT:
  361.     sz$ = UIStartDlg(CUIDLL$, ASKQUIT, "FQuitDlgProc", 0, "")
  362.  
  363.     IF sz$ = "EXIT" THEN
  364.         UIPopAll
  365.         ERROR STFQUIT
  366.     ELSEIF sz$ = "REACTIVATE" THEN
  367.         GOTO ASKQUIT
  368.     ELSE
  369.         UIPop 1
  370.     END IF
  371.     RETURN
  372.  
  373.  
  374.  
  375. '**
  376. '** Purpose:
  377. '**     Adds the specified option files to the copy list.
  378. '** Arguments:
  379. '**     ftype%  - type of files to add, one of the following:
  380. '**             APPFILES, OPTFILES1, OPTFILES2
  381. '** Returns:
  382. '**     none.
  383. '*************************************************************************
  384. SUB AddOptFilesToCopyList (ftype%) STATIC
  385.  
  386.     IF GetListItem(CHECKSTATES$, ftype%) = "ON" THEN
  387.         SrcDir$ = GetSymbolValue("STF_SRCDIR")
  388.         IF ftype% = APPFILES THEN
  389.             AddSectionFilesToCopyList "AppFiles", SrcDir$, DEST$ + "\FOOTBALL"
  390.         ELSEIF ftype% = OPTFILES1 THEN
  391.             '*** Copy to our own path.
  392.             'AddSectionFilesToCopyList "ONLINE", SrcDir$, DEST$ + "\PASLINE"
  393.             'AddSectionFilesToCopyList "ONLINESYSTEM", SrcDir$, GetWindowsSysDir()
  394.         ELSEIF ftype% = OPTFILES2 THEN
  395.             'AddSectionFilesToCopyList "EXTSAMPLE", SrcDir$, DEST$ + "\EXT\SAMPLE"
  396.             'AddSectionFilesToCopyList "EXTOBJ", SrcDir$, DEST$ + "\EXT\LIB"
  397.             'AddSectionFilesToCopyList "EXTHEADER", SrcDir$, DEST$ + "\EXT\H"
  398.             'AddSectionFilesToCopyList "EXTHELP", SrcDir$, DEST$ + "\EXT\HELP"
  399.             'AddSectionKeyFileToCopyList "EXTOBJ", "1", SrcDir$, DEST$ + "\EXT\SAMPLE"
  400.         END IF
  401.         SrcDir$ = ""
  402.     END IF
  403. END SUB
  404.  
  405.  
  406. '**
  407. '** Purpose:
  408. '**     Recalculates disk space for the given option files and sets
  409. '**     the status info symbol "StatusItemsText".
  410. '** Arguments:
  411. '**     ftype% - type of files to add, one of the following:
  412. '**             APPFILES, OPTFILES1, OPTFILES2
  413. '** Returns:
  414. '**     none.
  415. '*************************************************************************
  416. SUB RecalcOptFiles (ftype%) STATIC
  417.     CursorSave% = ShowWaitCursor()
  418.     ClearCopyList
  419.     AddOptFilesToCopyList ftype%
  420.  
  421.     fExtra% = 0
  422.     IF ftype% = APPFILES THEN
  423.         ListSym$ = APPNEEDS$
  424.         IF GetListItem(CHECKSTATES$, APPFILES) = "ON" THEN
  425.             ''Add extra cost to Windows drive for ini/progman, etc.
  426.             ndrive% = ASC(ucase$(WINDRIVE$)) - ASC("A") + 1
  427.             ReplaceListItem EXTRACOSTS$, ndrive%, "10240"
  428.             fExtra% = 1
  429.         END IF
  430.     ELSEIF ftype% = OPTFILES1 THEN
  431.         ListSym$ = OPT1NEEDS$
  432.     ELSEIF ftype% = OPTFILES2 THEN
  433.         ListSym$ = OPT2NEEDS$
  434.     END IF
  435.  
  436.     StillNeed& = GetCopyListCost(EXTRACOSTS$, ListSym$, "")
  437.  
  438.     cost& = 0
  439.     FOR i% = 1 TO 26 STEP 1
  440.         cost&  = cost& + VAL(GetListItem(ListSym$, i%))
  441.     NEXT i%
  442.     ReplaceListItem STATUSTEXT$, ftype%, STR$(cost& / 1024) + " K"
  443.  
  444.     IF StillNeed& > 0 THEN
  445.         ReplaceListItem BIGLIST$, ftype%, "YES"
  446.     ELSE
  447.         ReplaceListItem BIGLIST$, ftype%, ""
  448.     END IF
  449.  
  450.     IF fExtra% THEN
  451.         ReplaceListItem EXTRACOSTS$, ndrive%, "0"
  452.     END IF
  453.     RestoreCursor CursorSave%
  454.     ListSym$ = ""
  455. END SUB
  456.  
  457.  
  458. '**
  459. '** Purpose:
  460. '**     Recalculates disk space and sets option status info according
  461. '**     to the current destination path.
  462. '** Arguments:
  463. '**     none.
  464. '** Returns:
  465. '**     none.
  466. '*************************************************************************
  467. SUB RecalcPath STATIC
  468.  
  469.     CursorSave% = ShowWaitCursor()
  470.  
  471.     RecalcOptFiles APPFILES
  472.     RecalcOptFiles OPTFILES1
  473.     RecalcOptFiles OPTFILES2
  474.  
  475.     RestoreCursor CursorSave%
  476. END SUB
  477.  
  478.  
  479. '**
  480. '** Purpose:
  481. '**     Sets drive status info according to latest disk space calcs.
  482. '** Arguments:
  483. '**     none.
  484. '** Returns:
  485. '**     none.
  486. '*************************************************************************
  487. SUB SetDriveStatus STATIC
  488.  
  489.     drive$ = MID$(DEST$, 1, 1)
  490.     ndrive% = ASC(ucase$(drive$)) - ASC("A") + 1
  491.     cost& = VAL(GetListItem(APPNEEDS$, ndrive%)) + VAL(GetListItem(OPT1NEEDS$, ndrive%)) + VAL(GetListItem(OPT2NEEDS$, ndrive%))
  492.     free& = GetFreeSpaceForDrive(drive$)
  493.     ReplaceListItem DRIVETEXT$, 1, drive$ + ":"
  494.     ReplaceListItem DRIVETEXT$, 2, STR$(cost& / 1024) + " K"
  495.     ReplaceListItem DRIVETEXT$, 3, STR$(free& / 1024) + " K"
  496.  
  497.     IF drive$ = WINDRIVE$ THEN
  498.         ReplaceListItem DRIVETEXT$, 4, ""
  499.         ReplaceListItem DRIVETEXT$, 5, ""
  500.         ReplaceListItem DRIVETEXT$, 6, ""
  501.     ELSE
  502.         ndrive% = ASC(ucase$(WINDRIVE$)) - ASC("A") + 1
  503.         cost& = VAL(GetListItem(APPNEEDS$, ndrive%)) + VAL(GetListItem(OPT1NEEDS$, ndrive%)) + VAL(GetListItem(OPT2NEEDS$, ndrive%))
  504.         IF cost& = 0 THEN
  505.             ReplaceListItem DRIVETEXT$, 4, ""
  506.             ReplaceListItem DRIVETEXT$, 5, ""
  507.             ReplaceListItem DRIVETEXT$, 6, ""
  508.         ELSE
  509.             free& = GetFreeSpaceForDrive(WINDRIVE$)
  510.             ReplaceListItem DRIVETEXT$, 4, WINDRIVE$ + ":"
  511.             ReplaceListItem DRIVETEXT$, 5, STR$(cost& / 1024) + " K"
  512.             ReplaceListItem DRIVETEXT$, 6, STR$(free& / 1024) + " K"
  513.         END IF
  514.     END IF
  515. END SUB
  516.  
  517.  
  518. '**
  519. '** Purpose:
  520. '**     Appends a file name to the end of a directory path,
  521. '**     inserting a backslash character as needed.
  522. '** Arguments:
  523. '**     szDir$  - full directory path (with optional ending "\")
  524. '**     szFile$ - filename to append to directory
  525. '** Returns:
  526. '**     Resulting fully qualified path name.
  527. '*************************************************************************
  528. FUNCTION MakePath (szDir$, szFile$) STATIC AS STRING
  529.     IF szDir$ = "" THEN
  530.         MakePath = szFile$
  531.     ELSEIF szFile$ = "" THEN
  532.         MakePath = szDir$
  533.     ELSEIF MID$(szDir$, LEN(szDir$), 1) = "\" THEN
  534.         MakePath = szDir$ + szFile$
  535.     ELSE
  536.         MakePath = szDir$ + "\" + szFile$
  537.     END IF
  538. END FUNCTION
  539.