home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0330 - 0339 / ibm0330-0339 / ibm0333.tar / ibm0333 / CCML2101.ZIP / WUTIL.MST < prev   
Encoding:
Text File  |  1994-10-05  |  2.2 KB  |  65 lines

  1. '************************************************************************
  2. '*                                                                      *
  3. '*              cc:Mail Installation - Common Utilities                 *
  4. '*                                                                      *
  5. '************************************************************************
  6.  
  7.  
  8. '*-------------------------------------------------------------------------
  9. '*  Constant Declarations
  10. '*-------------------------------------------------------------------------
  11. CONST STR_WINVER$       = "cc:Mail 2.0 requires Windows 3.1 or higher."
  12. CONST STR_WINVERTITLE$  = "Incorrect Windows Version"
  13.  
  14. '*-------------------------------------------------------------------------
  15. '*  Subroutine/Function Declarations
  16. '*-------------------------------------------------------------------------
  17. DECLARE FUNCTION CheckWinVer AS INTEGER
  18. DECLARE FUNCTION AppendPath$ (szSrcPath$, szSubDir$)
  19.  
  20.  
  21. '*-------------------------------------------------------------------------
  22. '*
  23. '*  CheckWinVer:
  24. '*      Check the Windows version, don't install on 3.0 or below
  25. '*
  26. '*-------------------------------------------------------------------------
  27.  
  28. FUNCTION CheckWinVer STATIC AS INTEGER
  29.  
  30.     nMajor% = GetWindowsMajorVersion()
  31.     IF nMajor% < 3 THEN
  32.         nReturn% = DoMsgBox(STR_WINVER$, STR_WINVERTITLE$, MB_ICONSTOP)
  33.         ERR = 1
  34.         CheckWinVer = 0
  35.     ELSEIF nMajor = 3 THEN
  36.         nMinor% = GetWindowsMinorVersion()
  37.         IF nMinor% = 0 THEN
  38.             nReturn% = DoMsgBox(STR_WINVER$, STR_WINVERTITLE$, MB_ICONSTOP)
  39.             ERR = 1
  40.             CheckWinVer = 0
  41.         END IF
  42.     END IF
  43.  
  44.     CheckWinVer = 1
  45.  
  46. END FUNCTION
  47.  
  48.  
  49. '*-------------------------------------------------------------------------
  50. '*
  51. '*  AppendPath:
  52. '*      Append a directory name to the specified path
  53. '*
  54. '*-------------------------------------------------------------------------
  55.  
  56. FUNCTION AppendPath$ (szSrcPath$, szSubDir$) STATIC
  57.  
  58.     IF MID$(szSrcPath$, LEN(szSrcPath$), 1) = "\" THEN
  59.         AppendPath$ = szSrcPath$ + szSubDir$
  60.     ELSE
  61.         AppendPath$ = szSrcPath$ + "\" + szSubDir$
  62.     END IF
  63.  
  64. END FUNCTION
  65.