home *** CD-ROM | disk | FTP | other *** search
- ' VBIT 1.40 (c) 1996 InfoTech AS, Bergen, Norway
- ' ----------------------------------------------------------------------
- Declare Function AnsiToAscii$ Lib "VBIT.DLL" (ByVal strIn$)
- Declare Function AsciiToAnsi$ Lib "VBIT.DLL" (ByVal strIn$)
- Declare Function CRLF$ Lib "VBIT.DLL" (ByVal strIn$, ByVal ascii%)
- Declare Function Decrypt$ Lib "VBIT.DLL" (ByVal strIn$, ByVal cryptStr$)
- Declare Function Decrypt7$ Lib "VBIT.DLL" (ByVal strIn$, ByVal cryptStr$)
- Declare Function DecryptZ$ Lib "VBIT.DLL" (ByVal strIn$, ByVal cryptStr$)
- Declare Function Encrypt$ Lib "VBIT.DLL" (ByVal strIn$, ByVal cryptStr$)
- Declare Function Encrypt7$ Lib "VBIT.DLL" (ByVal strIn$, ByVal cryptStr$)
- Declare Function EncryptZ$ Lib "VBIT.DLL" (ByVal strIn$, ByVal cryptStr$)
- Declare Function FileExist% Lib "VBIT.DLL" (ByVal fileName$)
- Declare Function FileFindPath$ Lib "VBIT.DLL" (ByVal fileName$)
- Declare Function FileGetAttr$ Lib "VBIT.DLL" (ByVal fileName$)
- Declare Function FileGetDate$ Lib "VBIT.DLL" (ByVal fileName$)
- Declare Function FileGetExt$ Lib "VBIT.DLL" (ByVal fileName$)
- Declare Function FileGetFileName$ Lib "VBIT.DLL" (ByVal fileName$)
- Declare Function FileGetName$ Lib "VBIT.DLL" (ByVal fileName$)
- Declare Function FileGetPath$ Lib "VBIT.DLL" (ByVal fileName$)
- Declare Function FileGetSize& Lib "VBIT.DLL" (ByVal fileName$)
- Declare Function FileGetTime$ Lib "VBIT.DLL" (ByVal fileName$)
- Declare Function FileGetVersion$ Lib "VBIT.DLL" (ByVal fileName$)
- Declare Function Find% Lib "VBIT.DLL" (ByVal findString$, ByVal inString$, ByVal pos%)
- Declare Function FullPath$ Lib "VBIT.DLL" (ByVal filePattern$)
- Declare Function GetAppName$ Lib "VBIT.DLL" ()
- Declare Function GetWinClassName$ Lib "VBIT.DLL" (ByVal hwnd%)
- Declare Function GetDayNumber& Lib "VBIT.DLL" (ByVal dateStr$, ByVal dateFmt$)
- Declare Function GetDateLong& Lib "VBIT.DLL" (ByVal dateNum&)
- Declare Function GetDateStr$ Lib "VBIT.DLL" (ByVal dateNum&, ByVal dateFmt$)
- Declare Function GetNumDays& Lib "VBIT.DLL" (ByVal fromDate$, ByVal toDate$, ByVal dateFmt$, ByVal typ%)
- Declare Function IniFileGetString$ Lib "VBIT.DLL" (ByVal fileName$, ByVal section$, ByVal entry$)
- Declare Function IniFilePutString% Lib "VBIT.DLL" (ByVal fileName$, ByVal section$, ByVal entry$, ByVal newString$)
- Declare Function Interest# Lib "VBIT.DLL" (ByVal fromDate$, ByVal toDate$, ByVal dateFmt$, amount#, iRate#, ByVal typ%)
- Declare Function LicenseGetCode$ Lib "VBIT.DLL" (ByVal lname$, ByVal lcode$)
- Declare Function LicenseVBIT% Lib "VBIT.DLL" (ByVal lname$, ByVal lcode$)
- Declare Function LicenseProgram% Lib "VBIT.DLL" (ByVal lname$, ByVal lcode$, ByVal key$)
- Declare Function Modulus10$ Lib "VBIT.DLL" (ByVal strIn$)
- Declare Function Modulus10Calc$ Lib "VBIT.DLL" (ByVal strIn$)
- Declare Function Modulus10Valid% Lib "VBIT.DLL" (ByVal strIn$)
- Declare Function Modulus11$ Lib "VBIT.DLL" (ByVal strIn$)
- Declare Function Modulus11Calc$ Lib "VBIT.DLL" (ByVal strIn$)
- Declare Function Modulus11Valid% Lib "VBIT.DLL" (ByVal strIn$)
- Declare Function Num0$ Lib "VBIT.DLL" (ByVal value&, ByVal nDigits%)
- Declare Function pick$ Lib "VBIT.DLL" (ByVal strIn$, ByVal pos%, ByVal num%)
- Declare Function pickWord$ Lib "VBIT.DLL" (ByVal strIn$, ByVal pos%, ByVal delim%)
- Declare Function PickWords$ Lib "VBIT.DLL" (ByVal strIn$, ByVal pos%, ByVal num%, ByVal delim%)
- Declare Function place$ Lib "VBIT.DLL" (ByVal fromStr$, ByVal toStr$, ByVal pos%, ByVal num%)
- Declare Function strip$ Lib "VBIT.DLL" (ByVal strIn$, ByVal delim$, ByVal stripType%)
- Declare Function Subst$ Lib "VBIT.DLL" (ByVal oldStr$, ByVal newStr$, ByVal inString$, pos%)
- Declare Function substAll$ Lib "VBIT.DLL" (ByVal oldStr$, ByVal newStr$, ByVal inString$)
- Declare Function SwapChrs$ Lib "VBIT.DLL" (ByVal strIn$, ByVal chrs$)
- Declare Function SwapDate$ Lib "VBIT.DLL" (ByVal dateIn$)
- Declare Function SwapStr$ Lib "VBIT.DLL" (ByVal strIn$, ByVal fromFmt$, ByVal toFmt$)
- Declare Function SysInfo$ Lib "VBIT.DLL" (ByVal what%)
- Declare Function SysInfoNum& Lib "VBIT.DLL" (ByVal what%)
- Declare Sub Trace Lib "VBIT.DLL" (ByVal strIn$)
- Declare Sub TraceStr Lib "VBIT.DLL" (ByVal strIn$)
- Declare Sub Sound Lib "VBIT.DLL" (ByVal typ$)
- Declare Function FormNum$ Lib "VBIT.DLL" (ByVal numb#, ByVal nDec%, ByVal length%, ByVal fmt$)
-
- ' Types for Strip (Leading/Trailing or Left/Right):
- Global Const STRIP_L% = &H100
- Global Const STRIP_T% = &H200
- Global Const STRIP_R% = &H200
- Global Const STRIP_LT% = &H300
- Global Const STRIP_LR% = &H300
- Global Const STRIP_ALL% = &H400
-
- ' Types for SysInfo:
- Global Const SCREEN_SIZE_X% = 1
- Global Const SCREEN_SIZE_Y% = 2
- Global Const SCREEN_SIZE_PALETTE% = 3
- Global Const MEMORY_FREE_KB% = 4
- Global Const MEMORY_BIGGEST_FREE_BLOCK_KB% = 5
- Global Const DISK_DRIVE% = 6
- Global Const DIR_WINDOWS% = 7
- Global Const DIR_WINDOWS_SYSTEM% = 8
- Global Const DISK_FREE_KB% = &H80
- Global Const DISK_SIZE_KB% = &H100
- Global Const DISK_CLUSTER_SIZE = &H180
- Global Const DISK_SECTOR_SIZE = &H200
- Global Const DISK_SECTORS_PR_CLUSTER = &H280
- Global Const DISK_AVAILABLE_CLUSTERS = &H300
- Global Const DISK_TOTAL_CLUSTERS = &H380
-
- Global Const DISK_PATH% = &H1000
- Global Const DISK_TYPE% = &H1080
- Global Const DISK_VOLUME_SERIAL_NUMBER% = &H1100
- Global Const DISK_VOLUME_LABEL% = &H1180
- Global Const DISK_VOLUME_DATE% = &H1200
- Global Const DISK_VOLUME_TIME% = &H1280
-
- ' SysInfo(DISK_TYPE) returns:
- Global Const DRIVE_REMOVABLE% = 2
- Global Const DRIVE_FIXED% = 3
- Global Const DRIVE_REMOTE% = 4
- Global Const DRIVE_CDROM% = 5
-
- 'Constants for GetNumDays and Interest..
- Global Const IT_MONTH% = 0
- Global Const IT_MONTH_30% = 1
- Global Const IT_YEAR% = 0
- Global Const IT_YEAR_360% = 2
- Global Const IT_YEAR_365% = 4
- Global Const IT_DATE_NO_VB_RT_ERR% = &H4000
-
- Function VBIT_init (ByVal progName$, ByVal licenseName$, ByVal licenseCode$, ByVal minVer#, ByVal lang%) As Integer
- Dim s$, c$, f$
- Dim ok%
- f$ = "VBIT.DLL"
- On Error Resume Next
- ok% = LicenseVBIT(licenseName$, licenseCode$)
- If Err = 0 Then
- If Not ok% Then
- Sound "!"
- Select Case lang%
- Case 47
- s$ = "Feil lisenskode for " & licenseName$
- Case Else
- s$ = "Wrong license code for " & licenseName$
- End Select
- MsgBox s$, 64, FileFindPath(f$)
- End If
- VBIT_init = True ' VBIT.DLL was found
- s$ = FileGetVersion(f$)
- If Val(s$) < minVer# Then
- Sound ("!")
- Select Case lang%
- Case 47
- s$ = "Filen """ & f$ & """ er for gammel !|(versjon=" & s$
- s$ = s$ & ": skulle ha vµrt minst " & minVer#
- s$ = s$ & ")||Hvis du ikke finner σrsaken|(f.eks. feil oppsett / sti),|"
- s$ = s$ & "b°r du installere " & progName & " pσ nytt."
- c$ = "FEIL VERSJON"
- Case Else
- s$ = "The file """ & f$ & """ is too old !|(version=" & s$
- s$ = s$ & ": should have been at least " & minVer#
- s$ = s$ & ")||If you can't find the reason (e.g. wrong path),|"
- s$ = s$ & "you must reinstall " & progName & "."
- c$ = "VERSION ERROR"
- End Select
- MsgBox CRLF(s$, -Asc("|")), 16, c$
- VBIT_init = False ' VBIT.DLL was found, but is too old
- End If
- Else
- Beep
- Select Case lang%
- Case 47
- s$ = "Finner ikke filen """ & f$ & """ !" & Chr$(13) & Chr$(10)
- s$ = s$ & "InstallΘr " & progName & " pσ nytt."
- c$ = "PROGRAMFEIL"
- Case Else
- s$ = "Can not find """ & f$ & """ !" & Chr$(13) & Chr$(10)
- s$ = s$ & "You must reinstall " & progName & "."
- c$ = "ERROR"
- End Select
- MsgBox s$, 16, c$
- VBIT_init = False ' VBIT.DLL was not found
- End If
- End Function
-
-