home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Ham Radio 1997
/
WOHR97_AmSoft_(1997-02-01).iso
/
amsoft
/
win95
/
source.zi_
/
AMSOFT.BAS
< prev
next >
Wrap
BASIC Source File
|
1996-04-14
|
6KB
|
105 lines
Attribute VB_Name = "AmSoft1"
'AmSoft.EXE - Windows "AmSoft-World of Ham Radio" Callsign CDRom Lookup
'(C)1995-96 AmSoft (C)1995-96 Alan Freeman KC5JGP
'Written in Visual Basic Professional 16-Bit, April 1996
'Last Mod: 04/14/1996
DefInt A-Z
Public Declare Sub Lower Lib "QPRO200.DLL" (Work As String)
Public Declare Sub ProperName Lib "QPRO200.DLL" (Work As String)
Public Declare Function ExeName Lib "QPRO200.DLL" () As String
Public Declare Function Exist Lib "QPRO200.DLL" (ByVal Filename As String) As Integer
Public Declare Function Num2Time Lib "QPRO200.DLL" (Tim As Long) As String
Public Declare Function Num2Date Lib "QPRO200.DLL" (ByVal X As Integer) As String
Public Declare Function Date2Num Lib "QPRO200.DLL" (ByVal Dat As String) As Integer
Public Declare Function Time2Num Lib "QPRO200.DLL" (ByVal Tim As String) As Long
Public Declare Function QPTrim Lib "QPRO200.DLL" (Work As String) As String
Public Declare Function CVL Lib "QPRO200.DLL" (Number As String) As Long
Public Declare Sub CallSignClose Lib "amsoftcs.dll" ()
Public Declare Function CallSignOpen Lib "amsoftcs.dll" (ByVal DataFileName As String) As Integer
Public Declare Function CallSignSetIndex Lib "amsoftcs.dll" (ByVal IndexNum As Integer) As Long
Public Declare Function CallSignCloseIndex Lib "amsoftcs.dll" () As Integer
Public Declare Function CallSignSearchRec Lib "amsoftcs.dll" (ByVal SearchFor As String) As Long
Public Declare Function CallSignPrevRec Lib "amsoftcs.dll" () As Long
Public Declare Function CallSignNextRec Lib "amsoftcs.dll" () As Long
Public Declare Function CallSignFirstRec Lib "amsoftcs.dll" () As Long
Public Declare Function CallSignLastRec Lib "amsoftcs.dll" () As Long
Public Declare Function CallSignGetNumRecs Lib "amsoftcs.dll" () As Long
Public Declare Function CallSignGetRecord Lib "amsoftcs.dll" (ByVal RecNum As Long, CSRec As CallSignRec) As Integer
' -------------------------------------------------------------------
' Constants used to specify which index will be used when searching
' for a record using the CallsignSearchRec&() function.
'Global Const NoIndex = 0
'Global Const CallsignIndex = 1
'Global Const NameIndex = 2
'Global Const CityIndex = 3
'Global Const OldCallIndex = 4
' ----------------------------------------------------------------------------
'Declare Function CallSignOpen% Lib "amsoftcs.dll" (ByVal DataFileName$)
'Declare Sub CallSignClose Lib "amsoftcs.dll" ()
' CallSignOpen() opens the data file. This must be called before any other
' routines in the library. Returns 1 if okay, 0 if an error occurs.
' CallSignClose() closes the data file, and any open indexes (if they haven't
' been closed already with CallSignCloseIndex(). Returns 1 unless an error
' occurs. If an error happens, it returns 0.
' ----------------------------------------------------------------------------
'Declare Function CallSignSetIndex& Lib "amsoftcs.dll" (ByVal IndexNum%)
'Declare Function CallSignCloseIndex% Lib "amsoftcs.dll" ()
' CallSignSetIndex%() sets the index order to the specified value. See the
' constants defined above for the value of IndexNum% to use. Returns 1
' if successful, 0 if an error occurs (file not found, etc.)
' CallSignCloseIndex%() - If you just want to close the index without closing
' the data file, this function does that.
' ----------------------------------------------------------------------------
'Declare Function CallSignSearchRec& Lib "amsoftcs.dll" (ByVal SearchFor$)
'Declare Function CallSignPrevRec& Lib "amsoftcs.dll" ()
'Declare Function CallSignNextRec& Lib "amsoftcs.dll" ()
'Declare Function CallSignFirstRec& Lib "amsoftcs.dll" ()
'Declare Function CallSignLastRec& Lib "amsoftcs.dll" ()
' CallSignSearchRec&() - Searches through the current index (if set to 1 thru
' 4 only) for the specified key. It returns the record number (1 to # of
' records) of the first matching record. For example, if you search for
' "Adams", it will return the first Adams found. You may also search on
' a partial string, as long as it's the first characters. For example,
' doing a search for 'N9' in callsign index order sets the record to the
' first record that starts with "N9". Probably "N9AA".
' --- NOTE: The following functions operate in indexed order. If you have
' not set the index (or if it has been set to 0), the records
' will be accessed in FILE order.
' CallSignPrevRec&() - Returns the previous record number in the index. If at
' the beginning of the file, it returns the first record number.
' CallSignNextRec&() - Returns the next record number in the index. If at the
' end of the file, it returns the last record number.
' CallSignFirstRec&() - Returns the first record number in the index.
' CallSignLastRec&() - Returns the last record number in the index.
' ----------------------------------------------------------------------------
'Declare Function CallSignGetNumRecs& Lib "amsoftcs.dll" ()
' CallSignGetNumRecs&() returns the number of records in the database
' ----------------------------------------------------------------------------
'Declare Function CallSignGetRecord% Lib "amsoftcs.dll" (ByVal RecNum&, CSRec As CallSignRec)
' Read a record from the database. RecNum& is 1 to # of records in the data
' file. CSRec is a type CallSignRec that will be filled in with the data
' read from the file. Returns 1 if okay. Returns 0 if an error occurs.
' ----------------------------------------------------------------------------
Type CallSignRec
CallSign As String * 8
LastName As String * 20
Suffix As String * 4
FirstName As String * 11
Initial As String * 1
ExpDate As String * 5
BirthDate As String * 5
Address As String * 35
City As String * 20
State As String * 2
ZipCode As String * 10
ClassLic As String * 1
OldCall As String * 8
End Type
Global Search As Integer, Record As Long, Drive As String, PrintFile As String
Global LabelFileAppend As Integer, LabelFile As String, Rcd As CallSignRec