Hello Michael,
I'm forwarding your mail to Brian WS1O which will be very pleased
to hear about it. Besides, your VB modules will be included in
the forthcoming Hamlib 1.2.4 I'm working on.
Thanks,
Stephane
On Tue, Feb 22, 2005 at 08:46:59PM +0100, mbenz@... wrote:
> sorry for being quiet for some time. Today I found the time to compleat Your VB
> Wrapper to be used with VB.NET 2002 with Framework 1.1 (others not tested)
>
> In the newer VB Modules (.BAS) don't exist anymore. So they were replaced by the
> Classes (.VB)
> The Wrapper is not in final Condition, many DLL Function are still not covered now,
> but it will be a good start.
>
> To Import the "Wrapper" use the Folder "Project" and "Import existing Element"
> Now import the Class "Class1.VB". It alsough seems to import into Sharpdevelop,
> so anybody can try it out for free!
> free.http://www.icsharpcode.net/OpenSource/SD/Default.aspx
>
> This Class contains Your Enumeration as well as the DLLImport to get Access to the
> Hamlib DLL.
>
> Covered are:
> - Init Rig with Comport and Speed
> - set/ get Frequency
> - set/get Mode
> - set/get VFO
> - get Riginfo
>
> -rig_debug_level_e not verified (Function is Void, VB Dokumentation
> sais this is not possible to be marshaled, but Compiler is still accapting this)
>
>
> To get access to the Class you have to add something like this in your Main Class
> Dim RigLib As RigControll = New RigControll 'get Acces
> to RigLib Klass
>
>
>
> here is an Example how to use the Class:
>
> Private Sub Button2_Click(ByVal sender As System.Object, ByVal
> e As System.EventArgs) Handles Button2.Click
> 'Dim tokenlookup As String = "rig_pathname"
> 'Dim tokenlookup As Object = "serial_speed"
> 'Dim Info As String
> Dim Frequenz As Double
> Dim ZeichenOut As String
> Dim TokenPointer As System.Int32
> Dim VFO As Integer
> Dim Mode As RigControll.RMode_t
> Dim Bandbreite As Long
> ' Dim RigLib As RigControll = New RigControll
>
> Button3.Enabled() = True
> Button2.Enabled() = False
>
>
> RigLib.rig_set_debug(RigControll.rig_debug_level_e.RIG_DEBUG_T
> RACE)
> myrig = RigLib.rig_init(RigNumber.Text)
>
> TBmyrig.Text = myrig.ToString 'convert myrig to
> String
>
> TokenPointer = RigLib.rig_token_lookup(myrig,
> "rig_pathname")
> TBZeichen.Text = RigLib.rig_set_conf(myrig,
> TokenPointer, ComboBox2.Text)
> Token.Text = TokenPointer
>
> TokenPointer = RigLib.rig_token_lookup(myrig,
> "serial_speed")
> TBZeichen.Text = RigLib.rig_set_conf(myrig,
> TokenPointer, ComboBox3.Text)
> Token.Text = TokenPointer
>
> RigLib.rig_open(myrig)
> TB_Riginfo.Text = RigLib.rig_get_info(myrig)
>
> RigLib.rig_get_vfo(myrig, VFO)
> TextBox8.Text = VFO.ToString
>
> RigLib.rig_get_freq(myrig, VFO, Frequenz)
> TextBox2.Text() = Frequenz
>
> RigLib.rig_get_mode(myrig, VFO, Mode, Bandbreite)
> TextBox3.Text =
> [Enum].GetName(GetType(RigControll.RMode_t), Mode)
> TextBox4.Text = Bandbreite
>
> End Sub
>
> +++++++++++++++++++++++++++++++++
>
> kind Regard
>
> Michael
>
|