lextudio/sharpsnmplib

Example for vb.net 2008?

Closed this issue · 6 comments

Hello,

sorry for my bad English. But since I have a small question times. :)

Maybe you have a small example for a simple query OID on a printer / PC for
vb.net 2008?

Thank you

J. B.

Original Reported Date: 2009-07-14T03:36:26.39-07:00
Original CodePlex Discussion Thread ID: 62352

Copied from CodePlex without authors:

Hi J.B.,

Do you notice that there are many ways to translate the C# sample we provided
in source code package to VB.NET?

Maybe that helps, as we don't have time to manually convert them to VB.NET.

Original Posted Date: 2009-07-17T16:55:46.123-07:00

Copied from CodePlex without authors:

new project, project - add reference to sharpsnmplib.dll and
sharpsnmplib.controls.dll

'gets the modelname of a printer

Imports Lextm.SharpSnmpLib
Imports Lextm.SharpSnmpLib.Security
Imports Lextm.SharpSnmpLib.Messaging

Imports System.Net
Imports System.Net.Sockets

Module snmpget

Sub Main()

    Dim ip As System.Net.IPAddress  
    IPAddress.TryParse("192.168.1.35", ip)

    Dim receiver As New IPEndPoint(ip, 161)

    Dim varlist As New List(Of Variable)  
    varlist.Add(New Variable(New ObjectIdentifier("1.3.6.1.2.1.25.3.2.1.3.1")))

    For Each var As Variable In Messenger.Get(VersionCode.V2, receiver, New OctetString("public"), varlist, 1000)

        Console.WriteLine(var)

    Next

End Sub

End Module

cheers

Lex

Original Posted Date: 2009-12-18T10:47:26.013-08:00

Copied from CodePlex without authors:

Hi,

Great example! Can somebody show an example of Walk usage with VB.NET?

Thanks!

-Rohis

Original Posted Date: 2010-02-03T09:58:43.467-08:00

Copied from CodePlex without authors:

Hi Rohis,

If you follow our latest FAQ page, you will see C# samples can be translated
to VB.NET using translation services from SharpDevelop.

Regards,

Original Posted Date: 2010-02-17T21:26:33.137-08:00

Copied from CodePlex without authors:

In 5.0 release, we start to ship official VB.NET samples. Though they are all
for Visual Studio 2010, you can understand how to use #SNMP in VB.NET a lot.

Regards,

Lex

Original Posted Date: 2010-05-28T23:04:39.977-07:00

Marked as Answer Date: 2013-10-06T20:47:52.317-07:00