home *** CD-ROM | disk | FTP | other *** search
/ Multi-CD Magazin 1993 January / MultiCDMagazin0193_2ndEd.bin / squeue / zdetect.ms_ / zdetect.ms
Text File  |  1993-01-04  |  6KB  |  138 lines

  1. '/************************************************************************
  2. '*                            Copyright (c) 1992 by                      *
  3. '*                         Zenographics, Inc. Irvine CA                  *
  4. '*                             All Rights Reserved                       *
  5. '*************************************************************************
  6. '*
  7. '* $Workfile:   zdetect.mst  $
  8. '*   $Author:   SCOTTC  $
  9. '*     $Date:   05 Jan 1993 11:02:50  $
  10. '* $Revision:   1.0  $
  11. '*   Project:   Setup for SuperPrint/Z-Script
  12. '*
  13. '*      $Log:   S:\setup\mssetup\source\vcs\zdetect.msv  $
  14. '* 
  15. '*    Rev 1.0   05 Jan 1993 11:02:50   SCOTTC
  16. '* Initial revision.
  17. '*
  18. '************************************************************************/
  19.  
  20.  
  21. ' ***** NOTICE *****
  22. ' This include file was derived from Microsoft's MSDETECT.INC.
  23. ' Many of the "wrapper" functions were removed to increase space
  24. ' in the code segment.  If Microsoft changes the MSDETECT.INC file
  25. ' in the future, it may be necessary to edit this file again.
  26. '   Dec-3-1992,SEC
  27. ' ***** NOTICE *****
  28.  
  29. '**************************************************************************
  30. '*************************  Setup Detect API's  ***************************
  31. '**************************************************************************
  32.  
  33. ''detect
  34.  
  35. DECLARE FUNCTION CbGetVersionOfFile LIB "msdetstf.dll" (szFile$, szBuf$, cbBuf%) AS INTEGER
  36. DECLARE FUNCTION LGetVersionNthField LIB "msdetstf.dll" (szVersion$, nField%) AS LONG
  37. DECLARE FUNCTION FGetValidDrivesList LIB "msdetstf.dll" (szSymbol$) AS INTEGER
  38. DECLARE FUNCTION FGetLocalHardDrivesList LIB "msdetstf.dll" (szSymbol$) AS INTEGER
  39. DECLARE FUNCTION FGetRemovableDrivesList LIB "msdetstf.dll" (szSymbol$) AS INTEGER
  40. DECLARE FUNCTION FGetNetworkDrivesList LIB "msdetstf.dll" (szSymbol$) AS INTEGER
  41. DECLARE FUNCTION LcbTotalDrive LIB "msdetstf.dll" (nDrive%) AS LONG
  42. DECLARE FUNCTION LcbFreeDrive LIB "msdetstf.dll" (nDrive%) AS LONG
  43. DECLARE FUNCTION FIsValidDrive LIB "msdetstf.dll" (nDrive%) AS INTEGER
  44. DECLARE FUNCTION FIsLocalHardDrive LIB "msdetstf.dll" (nDrive%) AS INTEGER
  45. DECLARE FUNCTION FIsRemoveDrive LIB "msdetstf.dll" (nDrive%) AS INTEGER
  46. DECLARE FUNCTION FIsRemoteDrive LIB "msdetstf.dll" (nDrive%) AS INTEGER
  47. DECLARE FUNCTION FDirExists LIB "msdetstf.dll" (szDir$) AS INTEGER
  48. DECLARE FUNCTION CbGetDateOfFile LIB "msdetstf.dll" (szFile$, szBuf$, cbBuf%) AS INTEGER
  49. DECLARE FUNCTION FDoesIniSectionExist LIB "msdetstf.dll" (szFile$, szSect$) AS INTEGER
  50. DECLARE FUNCTION FDoesIniKeyExist LIB "msdetstf.dll" (szFile$, szSect$, szKey$) AS INTEGER
  51. DECLARE FUNCTION CbGetIniKeyString LIB "msdetstf.dll" (szFile$, szSect$, szKey$, szBuf$, cbBuf%) AS INTEGER
  52. DECLARE FUNCTION WGetDOSMajorVersion LIB "msdetstf.dll" AS INTEGER
  53. DECLARE FUNCTION WGetDOSMinorVersion LIB "msdetstf.dll" AS INTEGER
  54. DECLARE FUNCTION CbGetEnvVariableValue LIB "msdetstf.dll" (szEnvVar$, szBuf$, cbBuf%) AS INTEGER
  55. DECLARE FUNCTION WGetNumWinApps LIB "msdetstf.dll" AS INTEGER
  56. DECLARE FUNCTION FGetParallelPortsList LIB "msdetstf.dll" (szSymbol$) AS INTEGER
  57. DECLARE FUNCTION FGetSerialPortsList LIB "msdetstf.dll" (szSymbol$) AS INTEGER
  58. DECLARE FUNCTION FHasMonochromeDisplay LIB "msdetstf.dll" AS INTEGER
  59. DECLARE FUNCTION FHasMouseInstalled LIB "msdetstf.dll" AS INTEGER
  60. DECLARE FUNCTION WGetConfigSmartdrvSize LIB "msdetstf.dll" AS INTEGER
  61. DECLARE FUNCTION WGetConfigRamdriveSize LIB "msdetstf.dll" AS INTEGER
  62. DECLARE FUNCTION WGetConfigNumBuffers LIB "msdetstf.dll" AS INTEGER
  63. DECLARE FUNCTION WGetConfigNumFiles LIB "msdetstf.dll" AS INTEGER
  64. DECLARE FUNCTION WGetConfigLastDrive LIB "msdetstf.dll" AS INTEGER
  65. DECLARE FUNCTION CbFindTargetOnEnvVar LIB "msdetstf.dll" (szFile$, szEnvVar$, szBuf$, cbBuf%) AS INTEGER
  66. DECLARE FUNCTION CbFindFileInTree LIB "msdetstf.dll" (szFile$, szDir$, szBuf$, cbBuf%) AS INTEGER
  67. DECLARE FUNCTION GetTypeFaceNameFromTTF LIB "msdetstf.dll" (szFile$, szBuf$, cbBuf%) AS INTEGER
  68. DECLARE FUNCTION GetExistingFOTFileForTTF LIB "msdetstf.dll" (szFile$, szBuf$, cbBuf%) AS INTEGER
  69.  
  70.  
  71.  
  72. '*************************************************************************
  73. '****************  Detect Basic Wrapper Declarations  ********************
  74. '*************************************************************************
  75.  
  76.  
  77. '' detect
  78. DECLARE FUNCTION GetFreeSpaceForDrive (szDrive$) AS LONG
  79. DECLARE FUNCTION GetVersionOfFile (szFile$) AS STRING
  80. DECLARE FUNCTION GetIniKeyString (szFile$, szSect$, szKey$) AS STRING
  81.  
  82.  
  83. '*************************************************************************
  84. FUNCTION GetFreeSpaceForDrive (szDrive$) STATIC  AS LONG
  85.     GetFreeSpaceForDrive = LcbFreeDrive(ASC(UCASE$(szDrive$)) - ASC("A") + 1)
  86. END FUNCTION
  87.  
  88.  
  89. '*************************************************************************
  90. FUNCTION GetVersionOfFile (szFile$) STATIC  AS STRING
  91. '$ifdef DEBUG
  92.     if FValidFATPath(szFile$) = 0 then
  93.         BadArgErr 1, "GetVersionOfFile", szFile$
  94.     end if
  95. '$endif ''DEBUG
  96.     cb% = 30
  97.     szBuf$ = STRING$(cb%, 32)
  98.     cbRet% = CbGetVersionOfFile(szFile$, szBuf$, cb%)
  99.     GetVersionOfFile = szBuf$
  100. '$ifdef DEBUG
  101.     IF cbRet% >= cb% THEN
  102.         StfApiErr saeOvfl, "GetVersionOfFile", szFile$
  103.         ERROR STFERR
  104.     END IF
  105. '$endif ''DEBUG
  106.     szBuf$ = ""
  107. END FUNCTION
  108.  
  109.  
  110. '*************************************************************************
  111. FUNCTION GetIniKeyString (szFile$, szSect$, szKey$) STATIC  AS STRING
  112. '$ifdef DEBUG
  113.     if FValidIniFile(szFile$) = 0 then
  114.         n% = 1
  115.     elseif szKey$ = "" then
  116.         n% = 3
  117.     else
  118.         n% = 0
  119.     end if
  120.     if n% > 0 then
  121.         BadArgErr n%, "GetIniKeyString", szFile$+", "+szSect$+", "+szKey$
  122.     end if
  123. '$endif ''DEBUG
  124.  
  125.     cb% = 512
  126.     szBuf$ = STRING$(cb%, 32)
  127.     cbRet% = CbGetIniKeyString(szFile$, szSect$, szKey$, szBuf$, cb%)
  128.     GetIniKeyString = szBuf$
  129. '$ifdef DEBUG
  130.     IF cbRet% >= cb% THEN
  131.         StfApiErr saeOvfl, "GetIniKeyString", szFile$+", "+szSect$+", "+szKey$
  132.         ERROR STFERR
  133.     END IF
  134. '$endif ''DEBUG
  135.     szBuf$ = ""
  136. END FUNCTION
  137.  
  138.