Imports System Imports System.Windows.Forms Imports System.Runtime.InteropServices
Public Class Form1
Structure TDBFh Dim lupdt() As Byte Dim Rcount As Integer Dim hsize As Integer Dim recnm As Integer Dim fHdl As Integer Dim Temp() As Byte Public Sub Initialize() ReDim lupdt(4) ReDim Temp(260) End Sub End Structure
Structure TThLog Dim Qso() As Byte Public Sub Initialize() ReDim Qso(3927) End Sub End Structure
_ Private Shared Function GetThdllVersion() As Integer End Function
_ Private Shared Function dbf_open(ByRef s As String, ByRef d As TDBFh) As Integer 'ByValをByRefに変更 End Function
_ Private Shared Sub dbf_close(ByRef d As TDBFh) End Sub
_ Private Shared Function dbf_rcount(ByRef d As TDBFh) As Integer End Function
_ Private Shared Function Vdbf_open(ByRef s As String, ByRef d As TThLog) As Integer End Function
_ Private Shared Sub Vdbf_close(ByRef d As TThLog) End Sub
_ Private Shared Function Vdbf_rcount(ByRef d As TThLog) As Integer End Function
Public log As TThLog Public Th As TDBFh
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ver As Int32 Dim sd As Int32 Dim recno As Int32
Structure TThLog Dim Qso() As Byte Public Sub Initialize() ReDim Qso(3927) End Sub End Structure Structure TDBFh Dim lupdt() As Byte Dim Rcount As Integer Dim hsize As Integer Dim recnm As Integer Dim fHdl As Integer Dim Temp() As Byte Public Sub Initialize() ReDim lupdt(4) ReDim Temp(260) End Sub End Structure
Public Class Form1 Declare Function dbf_open Lib "Hamlog50.dll" (ByVal s As String, ByRef d As TDBFh) As Integer Declare Sub dbf_close Lib "Hamlog50.dll" (ByRef d As TDBFh) Declare Function dbf_rcount Lib "Hamlog50.dll" (ByRef d As TDBFh) As Integer Declare Function Vdbf_open Lib "Thdll2Vb.dll" (ByVal s As String, ByRef d As TThLog) As Integer Declare Sub Vdbf_close Lib "Thdll2Vb.dll" (ByRef d As TThLog) Declare Function Vdbf_rcount Lib "Thdll2Vb.dll" (ByRef d As TThLog) As Integer Declare Function HamlogOpen Lib "Hamlog50.dll" (ByVal h As Integer, ByRef th As TThLog, ByVal f As String, ByVal v As Integer) As Integer Declare Sub HamlogClose Lib "Hamlog50.dll" (ByRef th As TThLog, ByVal i As Integer) Declare Function ThwString Lib "Thdll2Vb.dll" (ByVal s As String, ByRef th As TThLog, ByVal n As Short) As Integer Declare Function THW_read Lib "Hamlog50.dll" (ByRef h As TThLog, ByVal n As Integer, ByVal i As Integer) As Integer
Structure TDBFh Dim lupdt() As Byte Dim Rcount As Integer Dim hsize As Integer Dim recnm As Integer Dim fHdl As Integer Dim Temp() As Byte Public Sub Initialize() ReDim lupdt(4) ReDim Temp(260) End Sub End Structure
Structure TThLog Dim Qso() As Byte ' Ver5.03で変更 Public Sub Initialize() ReDim Qso(3927) End Sub End Structure
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim sd As Integer Dim recno As Integer Dim tdbfh As TDBFh Dim th As TThLog Dim f As String
f = "C:\Hamlog.hdb" sd = dbf_open(f, tdbfh) recno = dbf_rcount(tdbfh) dbf_close(tdbfh) sd = Vdbf_open(f, th) recno = Vdbf_rcount(th) Vdbf_close(th) sd = HamlogOpen(0, th, f, 0) Call HamlogClose(th, 1) End Sub End Class