1 Jan 2005 14:01
Aw: RE: RE: VB.6 and hamlib-win32-1.2.3
<mbenz <at> nexgo.de>
2005-01-01 13:01:56 GMT
2005-01-01 13:01:56 GMT
Hello, totay I was able to read and write the frequency to hamlib.dll out of VB.NET. (using DummyRig) Stephane, you were right: "C is using cdecl convention." Thanks for the hint.(Continue reading)) I Changed the "Declare DLL" to this: (the Var-Types are not set 100% right jet) ++++++++++++++++ <DllImport("libhamlib-1-2-3-2.dll", CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Auto)> _ Public Shared Function rig_set_debug(ByVal debug_level As rig_debug_level_e) As Integer ' bleibt Leer End Function <DllImport("libhamlib-1-2-3-2.dll", CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Auto)> _ Public Shared Function rig_init(ByVal rig_model As Integer) As Integer ' bleibt Leer End Function <DllImport("libhamlib-1-2-3-2.dll", CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Auto)> _ Public Shared Function rig_open(ByVal RIGptr As Integer) As Integer ' bleibt Leer End Function <DllImport("libhamlib-1-2-3-2.dll", CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Auto)> _ Public Shared Function rig_close(ByVal RIGptr As Integer) As Integer ' bleibt Leer End Function
)
I Changed the "Declare DLL" to this: (the Var-Types are not set 100% right jet)
++++++++++++++++
<DllImport("libhamlib-1-2-3-2.dll", CallingConvention:=CallingConvention.Cdecl,
CharSet:=CharSet.Auto)> _
Public Shared Function rig_set_debug(ByVal debug_level As rig_debug_level_e) As Integer
' bleibt Leer
End Function
<DllImport("libhamlib-1-2-3-2.dll", CallingConvention:=CallingConvention.Cdecl,
CharSet:=CharSet.Auto)> _
Public Shared Function rig_init(ByVal rig_model As Integer) As Integer
' bleibt Leer
End Function
<DllImport("libhamlib-1-2-3-2.dll", CallingConvention:=CallingConvention.Cdecl,
CharSet:=CharSet.Auto)> _
Public Shared Function rig_open(ByVal RIGptr As Integer) As Integer
' bleibt Leer
End Function
<DllImport("libhamlib-1-2-3-2.dll", CallingConvention:=CallingConvention.Cdecl,
CharSet:=CharSet.Auto)> _
Public Shared Function rig_close(ByVal RIGptr As Integer) As Integer
' bleibt Leer
End Function
RSS Feed