home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pegasus 5
/
Pegasus_Vol_5_CD2.iso
/
lotus
/
winagent
/
install.dsk
/
SETUPAPI.LSS
< prev
next >
Wrap
Text File
|
1995-01-25
|
50KB
|
2,274 lines
USE "RESOURCE"
USE "GLOBALS"
OPTION DECLARE
PUBLIC CONST LOGPIXELSY = 90
PUBLIC CONST SM_CXSCREEN = 0
PUBLIC CONST SM_CYSCREEN = 1
PUBLIC CONST WF_80x87 = 1024
PUBLIC CONST WF_CPU186 = 128
PUBLIC CONST WF_CPU286 = 2
PUBLIC CONST WF_CPU386 = 4
PUBLIC CONST WF_CPU486 = 8
PUBLIC CONST WF_STANDARD = 16
PUBLIC CONST WF_ENHANCED = 32
PUBLIC CONST USERNAME = 514
PUBLIC CONST COMPANYNAME = 515
PUBLIC CONST NULLSTROK = 0
PUBLIC CONST INVALIDSTROK = 0
PUBLIC CONST NULLSTRERR = 1
PUBLIC CONST INVALIDSTRERR = 1
PUBLIC CONST HELP_CONTEXT = 1
PUBLIC CONST HELP_QUIT = 2
PUBLIC CONST HELP_INDEX = 3
PUBLIC CONST HELP_CONTENTS = 3
PUBLIC CONST HELP_HELPONHELP = 4
PUBLIC CONST HELP_SETINDEX = 5
PUBLIC CONST HELP_SETCONTENTS = 5
PUBLIC CONST HELP_CONTEXTPOPUP = 8
PUBLIC CONST HELP_FORCEFILE = 9
PUBLIC CONST HELP_KEY = 257
PUBLIC CONST HELP_COMMAND = 258
PUBLIC CONST HELP_PARTIALKEY = 261
PUBLIC CONST HELP_MULTIKEY = 513
PUBLIC CONST HELP_SETWINPOS = 515
PUBLIC CONST MB_SYSTEMMODAL = 4096
PUBLIC CONST MB_TASKMODAL = 8192
PUBLIC CONST MB_OK = &H0000
PUBLIC CONST MB_OKCANCEL = &H0001
PUBLIC CONST MB_ABORTRETRYIGNORE = &H0002
PUBLIC CONST MB_YESNOCANCEL = &H0003
PUBLIC CONST MB_YESNO = &H0004
PUBLIC CONST MB_RETRYCANCEL = &H0005
PUBLIC CONST MB_TYPEMASK = &H000F
PUBLIC CONST MB_ICONHAND = &H0010
PUBLIC CONST MB_ICONQUESTION = &H0020
PUBLIC CONST MB_ICONEXCLAMATION = &H0030
PUBLIC CONST MB_ICONASTERISK = &H0040
PUBLIC CONST MB_ICONMASK = &H00F0
PUBLIC CONST MB_ICONINFORMATION = MB_ICONASTERISK
PUBLIC CONST MB_ICONSTOP = MB_ICONHAND
PUBLIC CONST IDYES = 6
PUBLIC CONST IDNO = 7
PUBLIC CONST cmoVital = 1
PUBLIC CONST cmoCopy = 2
PUBLIC CONST cmoUndo = 4
PUBLIC CONST cmoRoot = 8
PUBLIC CONST cmoDecompress = 16
PUBLIC CONST cmoTimeStamp = 32
PUBLIC CONST cmoReadOnly = 64
PUBLIC CONST cmoBackup = 128
PUBLIC CONST cmoForce = 256
PUBLIC CONST cmoRemove = 512
PUBLIC CONST cmoOverwrite = 1024
PUBLIC CONST cmoAppend = 2048
PUBLIC CONST cmoPrepend = 4096
PUBLIC CONST cmoNone = 0
PUBLIC CONST cmoAll = 65535
PUBLIC CONST femExists = 0
PUBLIC CONST femRead = 1
PUBLIC CONST femWrite = 2
PUBLIC CONST femReadWrite = 3
PUBLIC CONST ynrcNo = 0
PUBLIC CONST ynrcYes = 1
PUBLIC CONST ynrcErr1 = 2
PUBLIC CONST ynrcErr2 = 3
PUBLIC CONST ynrcErr3 = 4
PUBLIC CONST ynrcErr4 = 5
PUBLIC CONST ynrcErr5 = 6
PUBLIC CONST ynrcErr6 = 7
PUBLIC CONST ynrcErr7 = 8
PUBLIC CONST ynrcErr8 = 9
PUBLIC CONST ynrcErr9 = 10
PUBLIC CONST EW_RESTARTWINDOWS = 66
PUBLIC CONST EW_REBOOTSYSTEM = 67
PUBLIC CONST ADD_GRP = 0
PUBLIC CONST grcOkay = 0
PUBLIC CONST grcNotOkay = 1
PUBLIC CONST grcUserQuit = 48
PUBLIC CONST cbSymValMax = 512
PUBLIC CONST STFERR = 1024
PUBLIC CONST STFQUIT = 1025
PUBLIC CONST STFTOGGLE = 1026
PUBLIC CONST scmOff = 0
PUBLIC CONST scmOnIgnore = 1
PUBLIC CONST scmOnFatal = 2
PUBLIC CONST REG_SZ& = 1
PUBLIC CONST HKEY_CLASSES_ROOT& = 1
PUBLIC CONST ERROR_SUCCESS = 0
PUBLIC CONST GRC_API_FAILED = 104
PUBLIC CONST LOGO = 2
PUBLIC CONST SW_HIDE = 0
PUBLIC CONST SW_SHOW = 5
PUBLIC CONST SW_SHOWNORMAL = 1
PUBLIC CONST SW_NORMAL = 1
PUBLIC CONST SW_SHOWMINIMIZED= 2
PUBLIC CONST SW_SHOWMAXIMIZED = 3
PUBLIC CONST SW_MAXIMIZE = 3
PUBLIC CONST SW_SHOWNOACTIVATE = 4
PUBLIC CONST SW_MINIMIZE = 6
PUBLIC CONST SW_SHOWMINNOACTIVE = 7
PUBLIC CONST SW_SHOWNA = 8
PUBLIC CONST SW_RESTORE = 9
DIM hSetup AS INTEGER
DIM g_strbuf AS STRING
PUBLIC gStrK AS STRING
PUBLIC gStrMB AS STRING
DECLARE PUBLIC FUNCTION OpenBookShelfFile LIB "FIXBOOK.DLL" (ByVal bookshelfname$) AS INTEGER
DECLARE PUBLIC FUNCTION CloseBookShelfFile LIB "FIXBOOK.DLL" () AS INTEGER
DECLARE PUBLIC FUNCTION AddBook LIB "FIXBOOK.DLL" (ByVal bookpath$, ByVal bookcaption$) AS INTEGER
DECLARE PUBLIC FUNCTION BcfMod LIB "BCFMOD.DLL" (ByVal BcfFilepath$, ByVal DNarg$, ByVal DLarg$, ByVal DCarg$, ByVal ACarg$, ByVal DDarg$) AS INTEGER
DECLARE PUBLIC FUNCTION FixODBCiniSources LIB "BCFMOD.DLL" (ByVal IniFile$, ByVal Sect1$, ByVal Match1$, ByVal Repl1$, ByVal Sect2$, ByVal Match2$, ByVal Repl2$) AS INTEGER
DECLARE PUBLIC FUNCTION FCleanFATPath LIB "lcomstf.dll" (ByVal szPath$) AS INTEGER
DECLARE PUBLIC FUNCTION FLotusInitialize LIB "lcomstf.dll" (ByVal sess&) AS INTEGER
DECLARE PUBLIC FUNCTION IsDBCSFirstAtOffset LIB "lcomstf.dll" (ByVal szStr$, ByVal cnt%) AS INTEGER
DECLARE PUBLIC FUNCTION FDBCSCharLen LIB "lcomstf.dll" (ByVal szStr$, ByVal offset%) AS INTEGER
DECLARE PUBLIC FUNCTION IsShareInstalled LIB "lcomstf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION ExitWindows LIB "user" (ByVal dwReturnCode%, ByVal wReserved%) AS INTEGER
DECLARE PUBLIC FUNCTION FindWindow LIB "user" (ByVal lpszClassName$, ByVal lpszWindow$) AS INTEGER
DECLARE PUBLIC FUNCTION ProgmanManageGroup LIB "mscuistf.dll" (ByVal szName$, ByVal fDelete%) AS INTEGER
DECLARE PUBLIC FUNCTION FDoDialog LIB "msuilstf.dll" (ByVal hwnd%, ByVal szDll$, ByVal Dlg%, ByVal szDlgProc$, ByVal HelpDlg%,_
ByVal szHelpProc$) AS INTEGER
DECLARE PUBLIC FUNCTION FKillNDialogs LIB "msuilstf.dll" (ByVal n%) AS INTEGER
DECLARE PUBLIC FUNCTION FCreateDir LIB "msinsstf.dll" (ByVal szDir$, ByVal cmo%) AS INTEGER
DECLARE PUBLIC FUNCTION FRemoveIniSection LIB "msinsstf.dll" (ByVal szFile$, ByVal szSect$, ByVal cmo%) AS INTEGER
DECLARE PUBLIC FUNCTION FCreateIniKeyValue LIB "msinsstf.dll" (ByVal szFile$, ByVal szSect$, ByVal szKey$, ByVal szValue$, ByVal cmo%) AS INTEGER
DECLARE PUBLIC FUNCTION FRemoveIniKey LIB "msinsstf.dll" (ByVal szFile$, ByVal szSect$, ByVal szKey$, ByVal cmo%) AS INTEGER
DECLARE PUBLIC FUNCTION FCreateSysIniKeyValue LIB "msinsstf.dll" (ByVal szFile$, ByVal szSect$, ByVal szKey$, ByVal szValue$, ByVal cmo%) AS INTEGER
DECLARE PUBLIC FUNCTION FCreateProgManGroup LIB "msinsstf.dll" (ByVal szGroup$, ByVal szPath$, ByVal cmo%) AS INTEGER
DECLARE PUBLIC FUNCTION FCreateProgManItem LIB "msinsstf.dll" (ByVal szGroup$, ByVal szItem$, ByVal szCmd$, ByVal cmo%) AS INTEGER
DECLARE PUBLIC FUNCTION FShowProgManGroup LIB "msinsstf.dll" (ByVal szGroup$, ByVal szCmd$, ByVal cmo%) AS INTEGER
DECLARE PUBLIC FUNCTION FStampResource LIB "msinsstf.dll" (ByVal szSect$, ByVal szKey$, ByVal szDst$,_
ByVal wResType%, ByVal wResId%, ByVal szData$, ByVal cbData%) AS INTEGER
DECLARE PUBLIC FUNCTION FAddDos5Help LIB "msinsstf.dll" (ByVal szProgName$, ByVal szProgHelp$, ByVal cmo%) AS INTEGER
DECLARE PUBLIC FUNCTION FCopyOneFile LIB "msinsstf.dll" (ByVal szSrc$, ByVal szDest$, ByVal cmo%, ByVal fAppend%) AS INTEGER
DECLARE PUBLIC FUNCTION YnrcRemoveFile LIB "msinsstf.dll" (ByVal szFullPathSrc$, ByVal cmo%) AS INTEGER
DECLARE PUBLIC FUNCTION YnrcBackupFile LIB "msinsstf.dll" (ByVal szFullPath$, ByVal szBackup$, ByVal cmo%) AS INTEGER
DECLARE PUBLIC FUNCTION FInitializeInstall LIB "msinsstf.dll" ( ByVal hinst%, ByVal hwndFrame%) AS INTEGER
DECLARE PUBLIC FUNCTION WFindFileUsingFileOpen LIB "msinsstf.dll" (ByVal szFile$, ByVal szBuf$, ByVal cbBuf%) AS INTEGER
DECLARE PUBLIC FUNCTION FIsDirWritable LIB "msinsstf.dll" (ByVal szDir$) AS INTEGER
DECLARE PUBLIC FUNCTION FIsFileWritable LIB "msinsstf.dll" (ByVal szFile$) AS INTEGER
DECLARE PUBLIC FUNCTION SetDecompMode LIB "msinsstf.dll" (ByVal fMode%) AS INTEGER
DECLARE PUBLIC FUNCTION GetDecompMode LIB "msinsstf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION FPrependToPath LIB "msinsstf.dll" (ByVal szSrc$, ByVal szDst$, ByVal szDir$, ByVal cmo%) AS INTEGER
DECLARE PUBLIC FUNCTION SetTimeValue LIB "msinsstf.dll" (ByVal usHours%, ByVal usMinutes%, ByVal usSeconds%) AS INTEGER
DECLARE PUBLIC FUNCTION HShowWaitCursor LIB "msshlstf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION FRestoreCursor LIB "msshlstf.dll" (ByVal hPrev%) AS INTEGER
DECLARE PUBLIC FUNCTION FSetBitmap LIB "msshlstf.dll" (ByVal szDll$, ByVal Bitmap%) AS INTEGER
DECLARE PUBLIC FUNCTION FSetAbout LIB "msshlstf.dll" (ByVal szAbout1$, ByVal szAbout2$) AS INTEGER
DECLARE PUBLIC FUNCTION FSetSymbolValue LIB "msshlstf.dll" (ByVal szSymbol$,ByVal szValue$) AS INTEGER
DECLARE PUBLIC FUNCTION InitializeFrame LIB "msshlstf.dll" (ByVal szCmdLine$) AS INTEGER
DECLARE PUBLIC FUNCTION HwndFrame LIB "msshlstf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION HinstFrame LIB "msshlstf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION FWriteToFile LIB "msshlstf.dll" (ByVal szFile$, ByVal sz$) AS INTEGER
DECLARE PUBLIC FUNCTION FValidFATDir LIB "mscomstf.dll" (ByVal szDir$) AS INTEGER
DECLARE PUBLIC FUNCTION CchlValidFATSubPath LIB "mscomstf.dll" (ByVal szPath$) AS INTEGER
DECLARE PUBLIC FUNCTION EercErrorHandler LIB "mscomstf.dll" (ByVal grc%,ByVal fVital%,ByVal sz1$,ByVal sz2$,ByVal sz3$) AS INTEGER
DECLARE PUBLIC FUNCTION FValidFATPath LIB "mscomstf.dll" (ByVal szPath$) AS INTEGER
DECLARE PUBLIC FUNCTION FAddSpecialFileToCopyList LIB "mscomstf.dll" (ByVal szSect$, ByVal szKey$, ByVal szSrc$, ByVal szDest$) AS INTEGER
DECLARE PUBLIC FUNCTION FRemoveSymbol LIB "mscomstf.dll" (ByVal szSym$) AS INTEGER
DECLARE PUBLIC FUNCTION CbGetSymbolValue LIB "mscomstf.dll" (ByVal szSymbol$, ByVal szValue$,ByVal Length%) AS INTEGER
DECLARE PUBLIC FUNCTION UsGetListLength LIB "mscomstf.dll" (ByVal szSymbol$) AS INTEGER
DECLARE PUBLIC FUNCTION CbGetListItem LIB "mscomstf.dll" (ByVal szListSymbol$, ByVal n%, ByVal szListItem$, ByVal cbMax%) AS INTEGER
DECLARE PUBLIC FUNCTION FAddListItem LIB "mscomstf.dll" (ByVal szListSymbol$,ByVal szListItem$) AS INTEGER
DECLARE PUBLIC FUNCTION FReplaceListItem LIB "mscomstf.dll" (ByVal szListSymbol$, ByVal n%, ByVal szListItem$) AS INTEGER
DECLARE PUBLIC FUNCTION FOpenLogFile LIB "mscomstf.dll" (ByVal szFile$, ByVal fAppend%) AS INTEGER
DECLARE PUBLIC FUNCTION FCloseLogFile LIB "mscomstf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION FWriteToLogFile LIB "mscomstf.dll" (ByVal sz$, ByVal fRequire%) AS INTEGER
DECLARE PUBLIC FUNCTION DoMsgBox LIB "lcomstf.dll" (ByVal lpText$,ByVal lpCaption$,ByVal wType%) As INTEGER
DECLARE PUBLIC FUNCTION FParseFATPathIntoPieces LIB "mscomstf.dll" (ByVal szPath$, ByVal szVol$,_
ByVal cbVol%, ByVal szDir$, ByVal cbDir%, ByVal szFile$, ByVal cbFile%) AS INTEGER
DECLARE PUBLIC FUNCTION CbGetVersionOfFile LIB "msdetstf.dll" (ByVal szFile$,ByVal szBuf$,ByVal cbBuf%) AS INTEGER
DECLARE PUBLIC FUNCTION LGetVersionNthField LIB "msdetstf.dll" (ByVal szVersion$,ByVal nField%) AS LONG
DECLARE PUBLIC FUNCTION LcbGetSizeOfFile LIB "msdetstf.dll" (ByVal szFile$) AS LONG
DECLARE PUBLIC FUNCTION FGetValidDrivesList LIB "msdetstf.dll" (ByVal szSymbol$) AS INTEGER
DECLARE PUBLIC FUNCTION FGetLocalHardDrivesList LIB "msdetstf.dll" (ByVal szSymbol$) AS INTEGER
DECLARE PUBLIC FUNCTION FGetRemovableDrivesList LIB "msdetstf.dll" (ByVal szSymbol$) AS INTEGER
DECLARE PUBLIC FUNCTION FGetNetworkDrivesList LIB "msdetstf.dll" (ByVal szSymbol$) AS INTEGER
DECLARE PUBLIC FUNCTION LcbTotalDrive LIB "msdetstf.dll" (ByVal nDrive%) AS LONG
DECLARE PUBLIC FUNCTION LcbFreeDrive LIB "msdetstf.dll" (ByVal nDrive%) AS LONG
DECLARE PUBLIC FUNCTION FIsValidDrive LIB "msdetstf.dll" (ByVal nDrive%) AS INTEGER
DECLARE PUBLIC FUNCTION FIsLocalHardDrive LIB "msdetstf.dll" (ByVal nDrive%) AS INTEGER
DECLARE PUBLIC FUNCTION FIsRemoveDrive LIB "msdetstf.dll" (ByVal nDrive%) AS INTEGER
DECLARE PUBLIC FUNCTION FIsRemoteDrive LIB "msdetstf.dll" (ByVal nDrive%) AS INTEGER
DECLARE PUBLIC FUNCTION FDirExists LIB "msdetstf.dll" (ByVal szDir$) AS INTEGER
DECLARE PUBLIC FUNCTION FDoesFileExist LIB "msdetstf.dll" (ByVal szFileName$, ByVal mode%) AS INTEGER
DECLARE PUBLIC FUNCTION CbGetDateOfFile LIB "msdetstf.dll" (ByVal szFile$, ByVal szBuf$, ByVal cbBuf%) AS INTEGER
DECLARE PUBLIC FUNCTION FDoesIniSectionExist LIB "msdetstf.dll" (ByVal szFile$, ByVal szSect$) AS INTEGER
DECLARE PUBLIC FUNCTION FDoesIniKeyExist LIB "msdetstf.dll" (ByVal szFile$, ByVal szSect$, ByVal szKey$) AS INTEGER
DECLARE PUBLIC FUNCTION CbGetIniKeyString LIB "msdetstf.dll" (ByVal szFile$, ByVal szSect$, ByVal szKey$, ByVal szBuf$, ByVal cbBuf%) AS INTEGER
DECLARE PUBLIC FUNCTION WGetDOSMajorVersion LIB "msdetstf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION WGetDOSMinorVersion LIB "msdetstf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION CbGetEnvVariableValue LIB "msdetstf.dll" (ByVal szEnvVar$, ByVal szBuf$, ByVal cbBuf%) AS INTEGER
DECLARE PUBLIC FUNCTION WGetNumWinApps LIB "msdetstf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION FGetParallelPortsList LIB "msdetstf.dll" (ByVal szSymbol$) AS INTEGER
DECLARE PUBLIC FUNCTION FGetSerialPortsList LIB "msdetstf.dll" (ByVal szSymbol$) AS INTEGER
DECLARE PUBLIC FUNCTION FHas87MathChip LIB "msdetstf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION FHasMonochromeDisplay LIB "msdetstf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION FHasMouseInstalled LIB "msdetstf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION WGetConfigSmartdrvSize LIB "msdetstf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION WGetConfigRamdriveSize LIB "msdetstf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION WGetConfigNumBuffers LIB "msdetstf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION WGetConfigNumFiles LIB "msdetstf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION WGetConfigLastDrive LIB "msdetstf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION FIsDriverInConfig LIB "msdetstf.dll" (ByVal szDrv$) AS INTEGER
DECLARE PUBLIC FUNCTION CbFindTargetOnEnvVar LIB "msdetstf.dll" (ByVal szFile$, ByVal szEnvVar$, ByVal szBuf$, ByVal cbBuf%) AS INTEGER
DECLARE PUBLIC FUNCTION CbFindFileInTree LIB "msdetstf.dll" (ByVal szFile$, ByVal szDir$, ByVal szBuf$, ByVal cbBuf%) AS INTEGER
DECLARE PUBLIC FUNCTION GetTypeFaceNameFromTTF LIB "msdetstf.dll" (ByVal szFile$, ByVal szBuf$, ByVal cbBuf%) AS INTEGER
DECLARE PUBLIC FUNCTION GetExistingFOTFileForTTF LIB "msdetstf.dll" (ByVal szFile$, ByVal szBuf$, ByVal cbBuf%) AS INTEGER
DECLARE PUBLIC FUNCTION HinstCui LIB "mscuistf.dll" () AS INTEGER
DECLARE PUBLIC FUNCTION SendDlgItemMessage LIB "user" (ByVal hDlg%,ByVal idCtrl%,ByVal msg%,ByVal w%,ByVal l&) AS LONG
DECLARE PUBLIC FUNCTION SendMessage LIB "user" (ByVal hWnd%,ByVal msg%,ByVal w%,ByVal l&) AS LONG
DECLARE PUBLIC FUNCTION GetTickCount LIB "user" () AS LONG
DECLARE PUBLIC FUNCTION GetDC LIB "User" (ByVal hWnd%) As Integer
DECLARE PUBLIC FUNCTION ReleaseDC LIB "User" (ByVal hWnd%, ByVal hDC%) As Integer
DECLARE PUBLIC FUNCTION GetDeviceCaps LIB "GDI" (ByVal hDC%, ByVal nIndex%) As Integer
DECLARE PUBLIC FUNCTION WinHelp LIB "user" (ByVal hwndMain%, ByVal helpfile$, ByVal context%, ByVal ID AS LONG) AS INTEGER
DECLARE PUBLIC FUNCTION WinExec LIB "kernel" (ByVal path$, ByVal data%) AS INTEGER
DECLARE PUBLIC FUNCTION IsDlgbuttonChecked LIB "User" (ByVal hwnd%, ByVal fEnable%) AS INTEGER
DECLARE PUBLIC FUNCTION GetWindowsDirectory LIB "kernel" (ByVal szBuf$,ByVal cbBuf%) AS INTEGER
DECLARE PUBLIC FUNCTION GetSystemDirectory LIB "kernel" (ByVal szBuf$, ByVal cbBuf%) AS INTEGER
DECLARE PUBLIC FUNCTION GetProfileString LIB "kernel" (ByVal szSect$,ByVal szKey$,ByVal szDefault$,ByVal szBuf$,ByVal cbBuf%) AS INTEGER
DECLARE PUBLIC FUNCTION GetVersion LIB "kernel" () AS INTEGER
DECLARE PUBLIC FUNCTION GetSystemMetrics LIB "user" (ByVal nIndex%) AS INTEGER
DECLARE PUBLIC FUNCTION GetWinFlags LIB "kernel" () AS LONG
DECLARE PUBLIC FUNCTION LoadString LIB "user" (ByVal hinst%,ByVal TextID%, ByVal Textbuf$, ByVal BufSize%) AS INTEGER
DECLARE PUBLIC FUNCTION GetModuleHandle LIB "kernel" (ByVal path$) AS INTEGER
DECLARE PUBLIC FUNCTION GetDlgItem LIB "user" (ByVal hwndDlg%,ByVal idControl%) AS INTEGER
DECLARE PUBLIC FUNCTION IsWindowVisible LIB "user" (ByVal hwndDlg%) AS INTEGER
DECLARE PUBLIC FUNCTION UpdateWindow LIB "user" (ByVal hwndDlg%) AS INTEGER
DECLARE PUBLIC FUNCTION SetFocus LIB "user" (ByVal hwndDlg%) AS INTEGER
DECLARE PUBLIC FUNCTION GetParent LIB "user" (ByVal hwndDlg%) AS INTEGER
DECLARE PUBLIC SUB SetWindowText LIB "user" (ByVal hwnd%, ByVal lpString$)
DECLARE PUBLIC FUNCTION EnableWindow LIB "user" (ByVal hwnd%, ByVal fEnable%) AS INTEGER
DECLARE PUBLIC FUNCTION ShowWindow LIB "user" (ByVal hwnd%, ByVal fEnable%) AS INTEGER
DECLARE PUBLIC FUNCTION RegSetValue LIB "shell" (ByVal hKey&, ByVal szSubKey$, ByVal dwType&, ByVal szValue$, ByVal cbValue&) AS LONG
DECLARE PUBLIC FUNCTION RegCloseKey LIB "shell" (ByVal hKey&) AS LONG
DECLARE PUBLIC SUB CreateIniKeyValue (szFile$, szSect$, szKey$, szValue$, cmo%)
DECLARE PUBLIC SUB CreateProgmanGroup (szGroup$, szPath$, cmo%)
DECLARE PUBLIC SUB CreateProgmanItem (szGroup$, szItem$, szCmd$, szOther$, cmo%)
DECLARE PUBLIC SUB ShowProgmanGroup (szGroup$, Cmd%, cmo%)
DECLARE PUBLIC SUB CopyFile (szFullPathSrc$, szFullPathDst$, cmo%, fAppend%)
DECLARE PUBLIC SUB RemoveFile (szFullPathSrc$, cmo%)
DECLARE PUBLIC SUB InitInstall
DECLARE PUBLIC SUB OpenLogFile (szFile$, fAppend%)
DECLARE PUBLIC SUB CloseLogFile
DECLARE PUBLIC SUB WriteToLogFile (szStr$)
DECLARE PUBLIC FUNCTION IsDirWritable (szDir$) AS INTEGER
DECLARE PUBLIC FUNCTION IsFileWritable (szFile$) AS INTEGER
DECLARE PUBLIC SUB ErrorMsg (nMsg%, szErr$)
DECLARE PUBLIC SUB FatalErrorMsg (nMsg%, szErr$, nErr%)
DECLARE PUBLIC SUB ErrorMsgNoDlgExit (nMsg%, szErr$)
DECLARE PUBLIC FUNCTION LdString (TextID%) AS STRING
DECLARE PUBLIC FUNCTION GetWindowsMajorVersion () AS INTEGER
DECLARE PUBLIC FUNCTION GetWindowsMinorVersion () AS INTEGER
DECLARE PUBLIC FUNCTION GetWindowsMode () AS INTEGER
DECLARE PUBLIC FUNCTION GetWindowsDir () AS STRING
DECLARE PUBLIC FUNCTION GetWindowsSysDir () AS STRING
DECLARE PUBLIC FUNCTION IsWindowsShared () AS INTEGER
DECLARE PUBLIC FUNCTION GetScreenWidth () AS INTEGER
DECLARE PUBLIC FUNCTION GetScreenHeight () AS INTEGER
DECLARE PUBLIC FUNCTION IsDriveValid (szDrive$) AS INTEGER
DECLARE PUBLIC FUNCTION IsDriveLocalHard (szDrive$) AS INTEGER
DECLARE PUBLIC FUNCTION IsDriveRemovable (szDrive$) AS INTEGER
DECLARE PUBLIC FUNCTION IsDriveNetwork (szDrive$) AS INTEGER
DECLARE PUBLIC SUB GetValidDrivesList (szSymbol$)
DECLARE PUBLIC SUB GetLocalHardDrivesList (szSymbol$)
DECLARE PUBLIC SUB GetRemovableDrivesList (szSymbol$)
DECLARE PUBLIC SUB GetNetworkDrivesList (szSymbol$)
DECLARE PUBLIC FUNCTION GetTotalSpaceForDrive (szDrive$) AS LONG
DECLARE PUBLIC FUNCTION GetFreeSpaceForDrive (szDrive$) AS LONG
DECLARE PUBLIC FUNCTION GetDOSMajorVersion () AS INTEGER
DECLARE PUBLIC FUNCTION GetDOSMinorVersion () AS INTEGER
DECLARE PUBLIC FUNCTION GetEnvVariableValue (szEnvVar$) AS STRING
DECLARE PUBLIC FUNCTION GetNumWinApps () AS INTEGER
DECLARE PUBLIC FUNCTION DoesFileExist (szFile$, mode%) AS INTEGER
DECLARE PUBLIC FUNCTION GetDateOfFile (szFile$) AS STRING
DECLARE PUBLIC FUNCTION GetYearFromDate (szDate$) AS INTEGER
DECLARE PUBLIC FUNCTION GetMonthFromDate (szDate$) AS INTEGER
DECLARE PUBLIC FUNCTION GetDayFromDate (szDate$) AS INTEGER
DECLARE PUBLIC FUNCTION GetHourFromDate (szDate$) AS INTEGER
DECLARE PUBLIC FUNCTION GetMinuteFromDate (szDate$) AS INTEGER
DECLARE PUBLIC FUNCTION GetSecondFromDate (szDate$) AS INTEGER
DECLARE PUBLIC FUNCTION GetVersionOfFile (szFile$) AS STRING
DECLARE PUBLIC FUNCTION GetVersionNthField (szVersion$, nField%) AS LONG
DECLARE PUBLIC FUNCTION GetSizeOfFile (szFile$) AS LONG
DECLARE PUBLIC FUNCTION FindTargetOnEnvVar (szFile$, szEnvVar$) AS STRING
DECLARE PUBLIC FUNCTION FindFileInTree (szFile$, szDir$) AS STRING
DECLARE PUBLIC FUNCTION DoesDirExist (szDir$) AS INTEGER
DECLARE PUBLIC FUNCTION DoesIniSectionExist (szFile$, szSect$) AS INTEGER
DECLARE PUBLIC FUNCTION DoesIniKeyExist (szFile$, szSect$, szKey$) AS INTEGER
DECLARE PUBLIC FUNCTION GetIniKeyString (szFile$, szSect$, szKey$) AS STRING
DECLARE PUBLIC FUNCTION GetConfigSmartdrvSize () AS INTEGER
DECLARE PUBLIC FUNCTION GetConfigRamdriveSize () AS INTEGER
DECLARE PUBLIC FUNCTION GetConfigNumBuffers () AS INTEGER
DECLARE PUBLIC FUNCTION GetConfigNumFiles () AS INTEGER
DECLARE PUBLIC FUNCTION GetConfigLastDrive () AS STRING
DECLARE PUBLIC FUNCTION IsDriverInConfig (szDrv$) AS INTEGER
DECLARE PUBLIC FUNCTION GetProcessorType () AS INTEGER
DECLARE PUBLIC SUB GetParallelPortsList (szSymbol$)
DECLARE PUBLIC SUB GetSerialPortsList (szSymbol$)
DECLARE PUBLIC FUNCTION Has87MathChip () AS INTEGER
DECLARE PUBLIC FUNCTION HasMonochromeDisplay () AS INTEGER
DECLARE PUBLIC FUNCTION HasMouseInstalled () AS INTEGER
DECLARE PUBLIC SUB SetBitmap(szDll$, Bitmap%)
DECLARE PUBLIC SUB SetAbout(szAbout1$, szAbout2$)
DECLARE PUBLIC FUNCTION UIStartDlg(szDll$, Dlg%, szDlgProc$, HelpDlg%, szHelpProc$) AS STRING
DECLARE PUBLIC SUB UIPop (n%)
DECLARE PUBLIC SUB UIPopAll
DECLARE PUBLIC SUB SetTitle (sz$)
DECLARE PUBLIC SUB SetSymbolValue (szSymbol$, szValue$)
DECLARE PUBLIC SUB RemoveSymbol (szSym$)
DECLARE PUBLIC FUNCTION GetSymbolValue (szSymbol$) AS STRING
DECLARE PUBLIC FUNCTION GetListLength(szSymbol$) AS INTEGER
DECLARE PUBLIC FUNCTION GetListItem(szSymbol$, n%) AS STRING
DECLARE PUBLIC SUB AddListItem(szSymbol$, szItem$)
DECLARE PUBLIC SUB ReplaceListItem(szSymbol$, n%, szItem$)
DECLARE PUBLIC FUNCTION InitFrame (szCmdLine$) AS INTEGER
DECLARE PUBLIC FUNCTION InitSetup (szCmdLine$) AS INTEGER
DECLARE PUBLIC FUNCTION ShowWaitCursor () AS INTEGER
DECLARE PUBLIC SUB RestoreCursor (hPrev%)
DECLARE PUBLIC FUNCTION WriteToFile(szFile$,sz$) AS INTEGER
DECLARE PUBLIC FUNCTION Lot_CleanPath (path$) AS INTEGER
DECLARE PUBLIC SUB SetListItem (szSymbol$, n%, szListItem$)
DECLARE PUBLIC SUB SetUpAPI
DECLARE PUBLIC SUB ASSERT (assertion%, msg$)
PUBLIC FUNCTION InitSetup(szCmdLine$) AS INTEGER
DIM i%
i% = InitFrame(szCmdLine$)
InitInstall
InitSetup = i%
END FUNCTION
PUBLIC FUNCTION InitFrame(szCmdLine$) AS INTEGER
DIM i%
IF hSetup > 0 THEN
ELSE
i% = InitializeFrame(szCmdLine$)
IF i% = -1 THEN
ERROR STFQUIT
ELSEIF i% = 0 THEN
END
ELSE
InitFrame = i%
END IF
END IF
END FUNCTION
PUBLIC SUB SetBitmap(szDll$, Bitmap%)
IF FSetBitmap(szDll$, Bitmap%) = FALSE THEN
ASSERT TRUE, ""
END IF
END SUB
PUBLIC SUB SetAbout(szAbout1$, szAbout2$)
IF FSetAbout(szAbout1$, szAbout2$) = FALSE THEN
ASSERT TRUE, ""
END IF
END SUB
PUBLIC SUB SetTitle(sz$)
SetWindowText HwndFrame(), sz$
END SUB
PUBLIC FUNCTION UIStartDlg(szDll$, Dlg%, szDlgProc$, HelpDlg%, szHelpProc$) AS STRING
IF FDoDialog(HwndFrame(), szDll$, Dlg%, szDlgProc$, HelpDlg%, szHelpProc$) = FALSE THEN
ASSERT TRUE, ""
ERROR STFQUIT
ELSE
UIStartDlg = GetSymbolValue(SYM_DLGEVENT$)
END IF
END FUNCTION
PUBLIC SUB UIPop (n%)
IF FKillNDialogs(n%) = FALSE THEN
ASSERT TRUE, ""
END IF
END SUB
PUBLIC SUB UIPopAll
DIM notused%
IF FKillNDialogs(32767) = FALSE THEN
ASSERT TRUE, ""
END IF
END SUB
PUBLIC FUNCTION GetSymbolValue(szSymbol$) AS STRING
DIM szValue As String : szValue = string$(cbSymValMax,0)
DIM Length%
Length% = CbGetSymbolValue(szSymbol$, szValue$, cbSymValMax)
IF Length% >= cbSymValMax THEN
ErrorMsg SID_ERR_GETSYMBOLVALUE, LSI_INFO(13) & _
" : " & LSI_INFO(12) & " : " & LSI_INFO(11)
ERROR STFQUIT
ELSEIF (Length% = 0) THEN
szValue$=""
END IF
GetSymbolValue = LEFT$ (szValue$, Length%)
END FUNCTION
PUBLIC FUNCTION GetListLength(szSymbol$) AS INTEGER
GetListLength = UsGetListLength(szSymbol$)
IF szSymbol$ = "" THEN
ErrorMsg SID_ERR_GETLISTLENGTH, LSI_INFO(13) & _
" : " & LSI_INFO(12) & " : " & LSI_INFO(11) & CHR(10) &_
"GetListLength(" & szSymbol$ & ")"
ERROR STFQUIT
END IF
END FUNCTION
PUBLIC FUNCTION GetListItem(szListSymbol$, nItem%) AS STRING
DIM szListItem$, Length%
szListItem$ = string$(cbSymValMax,0)
Length% = CbGetListItem(szListSymbol$, nItem%, szListItem$, cbSymValMax)
GetListItem = szListItem$
IF Length% >= cbSymValMax THEN
ErrorMsg SID_ERR_GETLISTITEM, LSI_INFO(13) & _
" : " & LSI_INFO(12) & " : " & LSI_INFO(11) & CHR(10) &_
"GetListItem(" & szListSymbol$ & ", " & CSTR(nItem%) & ")"
ERROR STFQUIT
ELSEIF Length% <= 0 THEN
szListItem$ = ""
Length% = 0
END IF
if nItem% <= 0 or nItem% > GetListLength(szListSymbol$) then
ErrorMsg SID_ERR_GETLISTITEM2, LSI_INFO(13) & _
" : " & LSI_INFO(12) & " : " & LSI_INFO(11) & CHR(10) &_
"GetListItem(" & szListSymbol$ & ", " & CSTR(nItem%) & ")"
ERROR STFQUIT
end if
GetListItem = LEFT( szListItem$, Length% )
END FUNCTION
PUBLIC SUB AddListItem(szSymbol$, szItem$)
IF FAddListItem(ByVal szSymbol$,ByVal szItem$) = FALSE THEN
ErrorMsg SID_ERR_ADDLISTITEM,_
LSI_INFO(13) & " : " & LSI_INFO(12) & " : " & LSI_INFO(11)
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB ReplaceListItem(szSymbol$, n%, szItem$)
IF FReplaceListItem(szSymbol$, n%, szItem$) = FALSE THEN
ErrorMsg SID_ERR_REPLACELISTITEM, _
LSI_INFO(13) & " : " & LSI_INFO(12) & " : " & LSI_INFO(11)
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB SetSymbolValue(szSymbol$, szValue$)
DIM LocalValue$
LocalValue$ = TRIM$(szValue$)
IF FSetSymbolValue(szSymbol$, LocalValue$) = FALSE THEN
ErrorMsg SID_ERR_SETSYMBOLVALUE, _
LSI_INFO(13) & " : " & LSI_INFO(12) & " : " & LSI_INFO(11)
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB RemoveSymbol(szSym$)
IF FRemoveSymbol(szSym$) = FALSE THEN
ErrorMsg SID_ERR_REMOVESYMBOL, _
LSI_INFO(13) & " : " & LSI_INFO(12) & " : " & LSI_INFO(11)
ERROR STFQUIT
END IF
END SUB
PUBLIC FUNCTION ShowWaitCursor () AS INTEGER
ShowWaitCursor = HShowWaitCursor()
END FUNCTION
PUBLIC SUB RestoreCursor (hPrev%)
DIM i%
i% = FRestoreCursor(hPrev%)
IF i% = 0 THEN
ErrorMsg SID_ERR_RESTORECURSOR, ""
ERROR STFERR
END IF
END SUB
PUBLIC SUB InitInstall
IF hSetup > 0 THEN
ELSEIF FInitializeInstall(HinstFrame(), HwndFrame()) = FALSE THEN
END
END IF
END SUB
PUBLIC SUB CreateDir (szDir$, cmo%)
DIM logfile$
logfile$ = GetSymbolValue(SYM_LOGFILE$)
IF FCreateDir(szDir$, cmo%) = FALSE THEN
ErrorMsg SID_ERR_CREATEDIR, szDir$ & " " & CStr(cmo%) & CHR(10) &_
LSI_INFO(13) & " : " & LSI_INFO(12) & " : " & LSI_INFO(11)
ERROR STFQUIT
END IF
If logfile$ <> "" THEN
OpenLogFile logfile$,1
WriteToLogFile "** Successfully created " + szDir$+ " ;with cmo% = " + CStr(cmo%)
CloseLogFile
END IF
END SUB
PUBLIC SUB RemoveIniSection (szFile$, szSect$, cmo%)
DIM logfile$
logfile$ = GetSymbolValue(SYM_LOGFILE$)
IF FRemoveIniSection(szFile$, szSect$, cmo%) = FALSE THEN
ErrorMsg SID_ERR_REMOVEINISECTION, "** Failed removing ini entry from " & szFile$ & CHR(10) &_
LSI_INFO(13) & " : " & LSI_INFO(12) & " : " & LSI_INFO(11)
ERROR STFERR
END IF
If logfile$ <> "" THEN
OpenLogFile logfile$,1
WriteToLogFile "** Successfully removed from " + szFile$+ " ;with cmo% = " + CStr(cmo%)
WriteToLogFile "[" + szSect$ +"]"
CloseLogFile
END IF
END SUB
PUBLIC SUB CreateIniKeyValue (szFile$, szSect$, szKey$, szValue$, cmo%)
DIM logfile$
logfile$ = GetSymbolValue(SYM_LOGFILE$)
IF FCreateIniKeyValue(szFile$, szSect$, szKey$, szValue$, cmo%) = FALSE THEN
ErrorMsg SID_ERR_CREATEINIKEYVALUE, "** Failed writting to " & szFile$ & CHR(10) & _
LSI_INFO(13) & " : " & LSI_INFO(12) & " : " & LSI_INFO(11)
ERROR STFQUIT
END IF
If logfile$ <> "" THEN
OpenLogFile logfile$,1
WriteToLogFile "** Successfully wrote to " + szFile$+ " ;with cmo% = " + CStr(cmo%)
WriteToLogFile "[" + szSect$ +"]"
WriteToLogFile szKey$ +"="+ szValue$
CloseLogFile
END IF
END SUB
PUBLIC SUB RemoveIniKey (szFile$, szSect$, szKey$, cmo%)
DIM logfile$
logfile$ = GetSymbolValue(SYM_LOGFILE$)
IF FRemoveIniKey(szFile$, szSect$, szKey$, cmo%) = FALSE THEN
ErrorMsg SID_ERR_REMOVEINIKEY, "** Failed removing ini entry from " & szFile$ & CHR(10) &_
LSI_INFO(13) & " : " & LSI_INFO(12) & " : " & LSI_INFO(11)
ERROR STFERR
END IF
If logfile$ <> "" THEN
OpenLogFile logfile$,1
WriteToLogFile "** Successfully Removed from " + szFile$+ " ;with cmo% = " + CStr(cmo%)
WriteToLogFile "[" + szSect$ +"]"
WriteToLogFile szKey$ +"="
CloseLogFile
END IF
END SUB
PUBLIC SUB CreateSysIniKeyValue (szFile$, szSect$, szKey$, szValue$, cmo%)
DIM logfile$
logfile$ = GetSymbolValue(SYM_LOGFILE$)
IF FCreateSysIniKeyValue(szFile$, szSect$, szKey$, szValue$, cmo%) = FALSE THEN
ErrorMsg SID_ERR_CREATESYSINIKEYVALUE, "** Failed writting to " & szFile$ & CHR(10) & _
LSI_INFO(13) & " : " & LSI_INFO(12) & " : " & LSI_INFO(11)
ERROR STFQUIT
END IF
If logfile$ <> "" THEN
OpenLogFile logfile$,1
WriteToLogFile "** Successfully did a CreateSysIniKeyValue to " + szFile$+ " ;with cmo% = " + CStr(cmo%)
WriteToLogFile "[" + szSect$ +"]"
WriteToLogFile szKey$ +"="+ szValue$
CloseLogFile
END IF
END SUB
PUBLIC SUB CreateProgmanGroup (szGroup$, szPath$, cmo%)
IF FCreateProgManGroup(szGroup$, szPath$, cmo%) = FALSE THEN
ErrorMsg SID_ERR_CREATEPROGMANGROUP, szGroup$ & CHR(10) & _
LSI_INFO(13) & " : " & LSI_INFO(12) & " : " & LSI_INFO(11)
END IF
END SUB
PUBLIC SUB ShowProgmanGroup (szGroup$, Cmd%, cmo%)
IF FShowProgManGroup(szGroup$, STR$(Cmd%), cmo%) = FALSE THEN
ErrorMsg SID_ERR_SHOWPROGMANGROUP, ""
END IF
END SUB
PUBLIC SUB StampResource (szSect$, szKey$, szDst$, wResType%, wResId%, szData$, cbData%)
IF FStampResource (szSect$, szKey$, szDst$, wResType%, wResId%, szData$, cbData%) = FALSE THEN
ErrorMsg SID_ERR_STAMPRESOURCE, ""
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB CreateProgmanItem (szGroup$, szItem$, szCmd$, szOther$, cmo%)
DIM szItemNew$
szItemNew$ = szItem$
IF szOther$ <> "" THEN
szItemNew$ = szItem$ + "," + szOther$
END IF
IF FCreateProgManItem(CHR$(34)+szGroup$+CHR$(34), szItemNew$, szCmd$, cmo%) = FALSE THEN
ErrorMsg SID_ERR_CREATEPROGMANITEM, szItemNew$ & CHR(10) & _
LSI_INFO(13) & " : " & LSI_INFO(12) & " : " & LSI_INFO(11)
END IF
szItemNew$ = ""
END SUB
PUBLIC SUB AddDos5Help (szProgName$, szProgHelp$, cmo%)
IF FAddDos5Help (szProgName$, szProgHelp$, cmo%) = FALSE THEN
ErrorMsg SID_ERR_ADDDOS5HELP, ""
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB CopyFile (szFullPathSrc$, szFullPathDst$, cmo%, fAppend%)
IF FCopyOneFile(szFullPathSrc$, szFullPathDst$, (cmo OR cmoCopy), fAppend%) = FALSE THEN
ErrorMsg SID_ERR_COPYFILE, szFullPathSrc$ & LdString(SID_TO) & szFullPathDst$ & CHR(10) & _
LSI_INFO(13) & " : " & LSI_INFO(12) & " : " & LSI_INFO(11)
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB RemoveFile (szFullPathSrc$, cmo%)
IF YnrcRemoveFile(szFullPathSrc$, cmo%) = ynrcNo THEN
END IF
END SUB
PUBLIC SUB BackupFile (szFullPath$, szBackup$)
IF YnrcBackupFile(szFullPath$, szBackup$, cmoNone) = ynrcNo THEN
ErrorMsg SID_ERR_BACKUPFILE, szFullPath$ + LdString(SID_TO) + szBackup$
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB RenameFile (szFullPath$, szBackup$)
IF YnrcBackupFile(szFullPath$, szBackup$, cmoNone) = ynrcNo THEN
ErrorMsg SID_ERR_RENAMEFILE, szFullPath$ + LdString(SID_TO) + szBackup$
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB OpenLogFile (szFile$, fAppend%)
IF FOpenLogFile(szFile$, fAppend%) = FALSE THEN
ErrorMsg SID_ERR_OPENLOGFILE, szFile$
END IF
END SUB
PUBLIC SUB CloseLogFile
IF FCloseLogFile() = FALSE THEN
ErrorMsg SID_ERR_CLOSELOGFILE, ""
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB WriteToLogFile (szStr$)
IF FWriteToLogFile(szStr$, 1) = FALSE THEN
ErrorMsg SID_ERR_WRITETOLOGFILE, szStr$
ERROR STFQUIT
END IF
END SUB
PUBLIC FUNCTION FindFileUsingFileOpen (szFile$) AS STRING
DIM szBuf$, wRet%
szBuf$ = STRING$(512, 32)
wRet% = WFindFileUsingFileOpen(szFile$, szBuf$, len(szBuf$))
IF wRet% = 0 THEN
FindFileUsingFileOpen = LEFT$( szBuf$, INSTR (szBuf$, CHR$(0)) - 1)
ELSEIF wRet% = 1 THEN
FindFileUsingFileOpen = ""
ELSE
ErrorMsg SID_ERR_FINDFILEUSINGFILEOPEN, szFile$
ERROR STFQUIT
END IF
szBuf$ = ""
END FUNCTION
PUBLIC FUNCTION IsDirWritable (szDir$) AS INTEGER
IsDirWritable = FIsDirWritable(szDir$)
END FUNCTION
PUBLIC FUNCTION IsFileWritable (szFile$) AS INTEGER
IsFileWritable = FIsFileWritable(szFile$)
END FUNCTION
PUBLIC FUNCTION GetWindowsMajorVersion AS INTEGER
GetWindowsMajorVersion = GetVersion() MOD 256
END FUNCTION
PUBLIC FUNCTION GetWindowsMinorVersion AS INTEGER
GetWindowsMinorVersion = GetVersion() / 256
END FUNCTION
PUBLIC FUNCTION GetWindowsMode AS INTEGER
DIM longTmp&
GetWindowsMode = 0
longTmp& = GetWinFlags()
IF longTmp& AND WF_STANDARD THEN
GetWindowsMode = 1
ELSEIF longTmp& AND WF_ENHANCED THEN
GetWindowsMode = 2
END IF
END FUNCTION
PUBLIC FUNCTION GetWindowsDir AS STRING
DIM szBufAl$, cbBuf%, szBuf$, rv%
szBufAl$ = string$(256, 0)
cbBuf% = GetWindowsDirectory(szBufAl$, 256)
IF cbBuf% = 0 THEN
GetWindowsDir = ""
ErrorMsg SID_ERR_GETWINDOWSDIR, ""
ERROR STFQUIT
ELSE
IF cbBuf% > 255 THEN
ErrorMsg SID_ERR_GETWINDOWSDIR2, ""
ERROR STFQUIT
END IF
szBuf$ = LEFT$(szBufAl$, INSTR (szBufAl$, CHR$(0)) - 1)
IF MID$(szBuf$, 1, 1) = "\" THEN
szBuf$ = MID$(GetWindowsSysDir(), 1, 2) + szBuf$
ELSEIF MID$(szBuf$, 2, 1) <> ":" THEN
szBuf$ = MID$(GetWindowsSysDir(), 1, 3) + szBuf$
END IF
rv% = Lot_CleanPath(szBuf$)
IF rv% = FALSE THEN
ErrorMsg SID_ERR_GETWINDOWSDIR2, ""
ERROR STFQUIT
END IF
GetWindowsDir = szBuf$
END IF
END FUNCTION
PUBLIC FUNCTION GetWindowsSysDir() AS STRING
DIM szBufAl$, cbBuf%, szBuf$, rv%
szBufAl$ = string$(256, 0)
cbBuf% = GetSystemDirectory(szBufAl$, 256)
IF cbBuf% = 0 THEN
ErrorMsg SID_ERR_GETWINDOWSSYSDIR, ""
ERROR STFQUIT
ELSE
IF cbBuf% > 255 THEN
ErrorMsg SID_ERR_GETWINDOWSSYSDIR2, ""
ERROR STFQUIT
END IF
szBuf$ = LEFT$(szBufAl$, INSTR(szBufAl$, CHR$(0)) - 1)
IF MID$(szBuf$, 1, 1) = "\" THEN
szBuf$ = MID$(CURDIR$, 1, 2) + szBuf$
ELSEIF MID$(szBuf$, 2, 1) <> ":" THEN
szBuf$ = MID$(CURDIR$, 1, 3) + szBuf$
END IF
rv% = Lot_CleanPath(szBuf$)
IF rv% = FALSE THEN
ErrorMsg SID_ERR_GETWINDOWSSYSDIR2, ""
ERROR STFQUIT
END IF
GetWindowsSysDir = szBuf$
END IF
END FUNCTION
PUBLIC FUNCTION IsWindowsShared AS INTEGER
DIM szWin$, szSys$
szWin$ = GetWindowsDir()
szSys$ = GetWindowsSysDir()
IF LEN(szWin$) = 0 THEN
ErrorMsg SID_ERR_ISWINDOWSSHARED, ""
ERROR STFQUIT
END IF
IF LEN(szSys$) <= LEN(szWin$) THEN
IsWindowsShared = TRUE
ELSE
szSys$ = MID$(szSys$, 1, LEN(szWin$))
IF szWin$ = szSys$ THEN
IsWindowsShared = FALSE
ELSE
IsWindowsShared = TRUE
END IF
END IF
END FUNCTION
PUBLIC FUNCTION GetScreenWidth AS INTEGER
GetScreenWidth = GetSystemMetrics(SM_CXSCREEN)
END FUNCTION
PUBLIC FUNCTION GetScreenHeight AS INTEGER
GetScreenHeight = GetSystemMetrics(SM_CYSCREEN)
END FUNCTION
PUBLIC SUB PrependToPath (szSrc$, szDst$, szDir$, cmo%)
IF FPrependToPath (szSrc$, szDst$, szDir$, cmo%) = FALSE THEN
ErrorMsg SID_ERR_PREPENDTOPATH, _
szSrc$ & " : " & szDst$ & " : " & szDir$
ERROR STFQUIT
END IF
END SUB
PUBLIC SUB SetRegKeyValue(szKey$, szValue$)
DIM phKey AS LONG, i%, logfile$
logfile$ = GetSymbolValue(SYM_LOGFILE$)
IF RegSetValue(HKEY_CLASSES_ROOT, szKey$, REG_SZ, szValue$, len(szKey$)) > ERROR_SUCCESS THEN
i% = EercErrorHandler(GRC_API_FAILED, 1, "SetRegKeyValue", "", "")
ErrorMsg SID_ERR_SETREGKEYVALUE, szKey$ + LdString(SID_TO) + szValue$
END IF
If logfile$ <> "" THEN
OpenLogFile logfile$,1
WriteToLogFile "** Successfully SetRegKeyValue " + szKey$+ ", "+ szValue$
CloseLogFile
END IF
END SUB
PUBLIC FUNCTION IsDriveValid (szDrive$) AS INTEGER
IsDriveValid = FIsValidDrive(ASC(UCASE$(szDrive$)) - ASC("A") + 1)
END FUNCTION
PUBLIC FUNCTION IsDriveLocalHard (szDrive$) AS INTEGER
IsDriveLocalHard = FIsLocalHardDrive(ASC(UCASE$(szDrive$)) - ASC("A") + 1)
END FUNCTION
PUBLIC FUNCTION IsDriveRemovable (szDrive$) AS INTEGER
IsDriveRemovable = FIsRemoveDrive(ASC(UCASE$(szDrive$)) - ASC("A") + 1)
END FUNCTION
PUBLIC FUNCTION IsDriveNetwork (szDrive$) AS INTEGER
IsDriveNetwork = FIsRemoteDrive(ASC(UCASE$(szDrive$)) - ASC("A") + 1)
END FUNCTION
PUBLIC FUNCTION GetTotalSpaceForDrive (szDrive$) AS LONG
GetTotalSpaceForDrive = LcbTotalDrive(ASC(UCASE$(szDrive$)) - ASC("A") + 1)
END FUNCTION
PUBLIC FUNCTION GetFreeSpaceForDrive (szDrive$) AS LONG
GetFreeSpaceForDrive = LcbFreeDrive(ASC(UCASE$(szDrive$)) - ASC("A") + 1)
END FUNCTION
PUBLIC SUB GetValidDrivesList (szSymbol$)
if FGetValidDrivesList(szSymbol$) = FALSE then
ErrorMsg SID_ERR_GETVALIDDRIVESLIST, ""
ERROR STFQUIT
end if
END SUB
PUBLIC SUB GetLocalHardDrivesList (szSymbol$)
if FGetLocalHardDrivesList(szSymbol$) = FALSE then
ErrorMsg SID_ERR_GETLOCALHARDDRIVESLIST, ""
ERROR STFQUIT
end if
END SUB
PUBLIC SUB GetRemovableDrivesList (szSymbol$)
if FGetRemovableDrivesList(szSymbol$) = FALSE then
ErrorMsg SID_ERR_GETREMOVABLEDRIVESLIST, ""
ERROR STFQUIT
end if
END SUB
PUBLIC SUB GetNetworkDrivesList (szSymbol$)
if FGetNetworkDrivesList(szSymbol$) = FALSE then
ErrorMsg SID_ERR_GETNETWORKDRIVESLIST, ""
ERROR STFQUIT
end if
END SUB
PUBLIC FUNCTION GetDOSMajorVersion () AS INTEGER
GetDOSMajorVersion = WGetDOSMajorVersion()
END FUNCTION
PUBLIC FUNCTION GetDOSMinorVersion () AS INTEGER
GetDOSMinorVersion = WGetDOSMinorVersion()
END FUNCTION
PUBLIC FUNCTION GetEnvVariableValue (szEnvVar$) AS STRING
DIM cb%, szBuf$, cbRet%
cb% = 1024
szBuf$ = STRING$(cb%, 32)
cbRet% = CbGetEnvVariableValue(szEnvVar$, szBuf$, cb%)
szBuf$ = LEFT$ (szBuf$, INSTR (szBuf$, CHR$(0)) - 1)
GetEnvVariableValue = szBuf$
szBuf$ = ""
END FUNCTION
PUBLIC FUNCTION GetNumWinApps () AS INTEGER
GetNumWinApps = WGetNumWinApps()
END FUNCTION
PUBLIC FUNCTION DoesFileExist (szFileName$, mode%) AS INTEGER
DoesFileExist = FDoesFileExist(szFileName$, mode%)
END FUNCTION
PUBLIC FUNCTION GetDateOfFile (szFile$) AS STRING
DIM cb%, szBuf$, cbRet%
cb% = 20
szBuf$ = STRING$(cb%, 32)
cbRet% = CbGetDateOfFile(szFile$, szBuf$, cb%)
GetDateOfFile = LEFT$ (szBuf$, INSTR (szBuf$, CHR$(0)) - 1)
szBuf$ = ""
END FUNCTION
PUBLIC FUNCTION GetYearFromDate (szDate$) AS INTEGER
GetYearFromDate = VAL(MID$(szDate$, 1, 4))
END FUNCTION
PUBLIC FUNCTION GetMonthFromDate (szDate$) AS INTEGER
GetMonthFromDate = VAL(MID$(szDate$, 6, 2))
END FUNCTION
PUBLIC FUNCTION GetDayFromDate (szDate$) AS INTEGER
GetDayFromDate = VAL(MID$(szDate$, 9, 2))
END FUNCTION
PUBLIC FUNCTION GetHourFromDate (szDate$) AS INTEGER
GetHourFromDate = VAL(MID$(szDate$, 12, 2))
END FUNCTION
PUBLIC FUNCTION GetMinuteFromDate (szDate$) AS INTEGER
GetMinuteFromDate = VAL(MID$(szDate$, 15, 2))
END FUNCTION
PUBLIC FUNCTION GetSecondFromDate (szDate$) AS INTEGER
GetSecondFromDate = VAL(MID$(szDate$, 18, 2))
END FUNCTION
PUBLIC FUNCTION GetVersionOfFile (szFile$) AS STRING
DIM cb%, szBuf$, cbRet%
cb% = 30
szBuf$ = STRING$(cb%, 32)
cbRet% = CbGetVersionOfFile(szFile$, szBuf$, cb%)
GetVersionOfFile = LEFT$ (szBuf$, INSTR (szBuf$, CHR$(0)) - 1)
szBuf$ = ""
END FUNCTION
PUBLIC FUNCTION GetVersionNthField (szVersion$, nField%) AS LONG
GetVersionNthField = LGetVersionNthField(szVersion$, nField%)
END FUNCTION
PUBLIC FUNCTION GetSizeOfFile (szFile$) AS LONG
GetSizeOfFile = LcbGetSizeOfFile(szFile$)
END FUNCTION
PUBLIC FUNCTION FindTargetOnEnvVar (szFile$, szEnvVar$) AS STRING
DIM cb%, szBuf$, cbret%
cb% = 512
szBuf$ = STRING$(cb%, 32)
cbRet% = CbFindTargetOnEnvVar(szFile$, szEnvVar$, szBuf$, cb%)
IF cbRet% >= cb% THEN
ErrorMsg SID_ERR_FINDTARGETONENVVAR, ""
ERROR STFQUIT
END IF
szBuf$ = LEFT$ (szBuf$, INSTR (szBuf$, CHR$(0)) - 1)
IF MID$(szBuf$, 1, 1) = "\" THEN
szBuf$ = MID$(CURDIR$, 1, 2) + szBuf$
ELSEIF Len(szBuf$) > 0 AND MID$(szBuf$, 2, 1) <> ":" THEN
szBuf$ = MID$(CURDIR$, 1, 3) + szBuf$
END IF
FindTargetOnEnvVar = szBuf$
szBuf$ = ""
END FUNCTION
PUBLIC FUNCTION FindFileInTree (szFile$, szDir$) AS STRING
DIM cb%, szBuf$, cbret%
cb% = 512
szBuf$ = STRING$(cb%, 32)
cbRet% = CbFindFileInTree(szFile$, szDir$, szBuf$, cb%)
FindFileInTree = LEFT$ (szBuf$, INSTR (szBuf$, CHR$(0)) - 1)
szBuf$ = ""
END FUNCTION
PUBLIC FUNCTION GetConfigSmartdrvSize () AS INTEGER
GetConfigSmartdrvSize = WGetConfigSmartdrvSize()
END FUNCTION
PUBLIC FUNCTION GetConfigRamdriveSize () AS INTEGER
GetConfigRamdriveSize = WGetConfigRamdriveSize ()
END FUNCTION
PUBLIC FUNCTION GetConfigNumBuffers () AS INTEGER
GetConfigNumBuffers = WGetConfigNumBuffers()
END FUNCTION
PUBLIC FUNCTION GetConfigNumFiles () AS INTEGER
GetConfigNumFiles = WGetConfigNumFiles()
END FUNCTION
PUBLIC FUNCTION GetConfigLastDrive () AS STRING
DIM chRet%
chRet% = WGetConfigLastDrive()
if chRet% = 0 then
GetConfigLastDrive = ""
else
GetConfigLastDrive = CHR$(chRet%)
end if
END FUNCTION
PUBLIC FUNCTION IsDriverInConfig (szDrv$) AS INTEGER
IsDriverInConfig = FIsDriverInConfig(szDrv$)
END FUNCTION
PUBLIC FUNCTION GetProcessorType () AS INTEGER
DIM longTmp&
GetProcessorType = 0
longTmp& = GetWinFlags()
IF longTmp& AND WF_CPU486 THEN
GetProcessorType = 4
ELSEIF longTmp& AND WF_CPU386 THEN
GetProcessorType = 3
ELSEIF longTmp& AND WF_CPU286 THEN
GetProcessorType = 2
ELSEIF longTmp& AND WF_CPU186 THEN
GetProcessorType = 1
END IF
END FUNCTION
PUBLIC SUB GetParallelPortsList (szSymbol$)
if FGetParallelPortsList(szSymbol$) = FALSE then
ErrorMsg SID_ERR_GETPARALLELPORTSLIST, ""
ERROR STFQUIT
end if
END SUB
PUBLIC SUB GetSerialPortsList (szSymbol$)
if FGetSerialPortsList(szSymbol$) = FALSE then
ErrorMsg SID_ERR_GETSERIALPORTSLIST, ""
ERROR STFQUIT
end if
END SUB
PUBLIC FUNCTION Has87MathChip () AS INTEGER
Has87MathChip = FHas87MathChip()
END FUNCTION
PUBLIC FUNCTION HasMonochromeDisplay () AS INTEGER
HasMonochromeDisplay = FHasMonochromeDisplay()
END FUNCTION
PUBLIC FUNCTION HasMouseInstalled () AS INTEGER
HasMouseInstalled = FHasMouseInstalled()
END FUNCTION
PUBLIC FUNCTION DoesDirExist (szDir$) AS INTEGER
DoesDirExist = FDirExists(szDir$)
END FUNCTION
PUBLIC FUNCTION DoesIniSectionExist (szFile$, szSect$) AS INTEGER
DoesIniSectionExist = FDoesIniSectionExist(szFile$, szSect$)
END FUNCTION
PUBLIC FUNCTION DoesIniKeyExist (szFile$, szSect$, szKey$) AS INTEGER
DoesIniKeyExist = FDoesIniKeyExist(szFile$, szSect$, szKey$)
END FUNCTION
PUBLIC FUNCTION GetIniKeyString (szFile$, szSect$, szKey$) AS STRING
DIM cb%, szBuf$, cbRet%
cb% = 512
szBuf$ = STRING$(cb%, 0)
cbRet% = CbGetIniKeyString(szFile$, szSect$, szKey$, szBuf$, cb%)
GetIniKeyString = LEFT$ (szBuf$, INSTR (szBuf$, CHR$(0)) - 1)
szBuf$ = ""
END FUNCTION
PUBLIC SUB SetListItem (szSymbol$, n%, szListItem$)
DIM ListLen%, i%
ListLen% = GetListLength(szSymbol)
IF n% < 0 THEN
ErrorMsg SID_ERR_GETLISTITEM2, LSI_INFO(13) & _
" : " & LSI_INFO(12) & " : " & LSI_INFO(11)
ERROR STFQUIT
ELSEIF n% <= ListLen% THEN
ReplaceListItem szSymbol$, n%, szListItem$
ELSE
FOR i% = ListLen%+1 TO n%-1 STEP 1
AddListItem szSymbol$, ""
NEXT
AddListItem szSymbol$, szListItem$
END IF
END SUB
PUBLIC SUB ErrorMsg (nMsg%, szErr$)
DIM sz$, notused%
IF nMsg% <> 0 THEN
sz$ = LdString(nMsg%)
IF szErr$ <> "" THEN sz$ = sz$ + " " + szErr$
ELSE
sz$ = szErr$
END IF
notused = DoMsgBox (sz$, LdString(SID_TKT_STD_TITLE) , MB_OK + MB_ICONEXCLAMATION)
END SUB
PUBLIC SUB FatalErrorMsg (nMsg%, szErr$, nErr%)
ErrorMsg nMsg%, szErr$
ERROR nErr%
END SUB
PUBLIC SUB ErrorMsgNoDlgExit (nMsg%, szErr$)
ErrorMsg nMsg%, szErr$
SetListItem "__LASTSTATUS", 1, "Q"
END SUB
PUBLIC FUNCTION LdString (TextID%) AS STRING
DIM rc%
g_strbuf$ = string(256,0)
rc% = LoadString(HinstCui(), TextID%, g_strbuf$, 256-1)
ASSERT rc% <> 0, "String " + STR(TextID%) + " Not Found"
LdString = LEFT$(g_strbuf$, rc%)
g_strbuf$ = ""
END FUNCTION
PUBLIC FUNCTION Lot_CleanPath (path$) AS INTEGER
DIM rv%
rv% = FCleanFatPath(path$)
IF rv% <> FALSE THEN
rv% = INSTR(path$,CHR$(0))
IF (rv% > 0) THEN path$ = LEFT$(path$, rv% - 1)
IF RIGHT$(path$, 1) <> "\" OR IsDBCSFirstAtOffset(path$, LEN(path$) - 1) = 1 THEN path$ = path$ + "\"
path$ = LCASE$(path$)
Lot_CleanPath = TRUE
ELSE
Lot_CleanPath = FALSE
END IF
END FUNCTION
DIM gDEBUG%
PUBLIC SUB SetUpAPI
DIM cuidll$, gCursorSave%, notused%
gCursorSave% = ShowWaitCursor()
hSetup = InitSetup(COMMAND$)
IF ENVIRON$(gLOTUS_DEBUG) <> "" THEN
gDEBUG%=TRUE
ELSE
gDEBUG%=FALSE
END IF
cuidll$ = GetIniKeyString(GetSymbolValue(SYM_STF_CWDDIR$)+gINSTALLINI$,_
"TOOLKIT", SYM_CUIDLL$)
If cuidll$ = "" Then
cuidll$ = "MSCUISTF.DLL"
End If
SetSymbolValue SYM_CUIDLL$, cuidll$
SetBitmap cuidll$, LOGO
notused% = FLotusInitialize (LSI_INFO(4))
gStrK$ = LdString(SID_KBYTE_CHAR)
gStrMB$ = LdString(SID_MBYTE_CHAR)
END SUB
PUBLIC SUB ASSERT (assertion%, msg$)
DIM notused%
If assertion% = FALSE Then
If gDEBUG% = TRUE Then
notused% = DoMsgBox (LSI_INFO(13) & " : " & LSI_INFO(12) & " : " & _
LSI_INFO(11) + CHR(10) + msg$ , _
"ASSERT!!", MB_OK + MB_ICONEXCLAMATION )
ERROR STFQUIT
End If
End If
END SUB
PUBLIC FUNCTION WriteToFile(szFile$,sz$) AS INTEGER
WriteToFile = FWriteToFile(szFile$,sz$)
END FUNCTION