Solved

getting ssid in visual basic

Posted on 2004-10-03
6
1,637 Views
Last Modified: 2008-01-09
i am trying to get ssid ... signal strength is working fine but ssid is giving me some problems...
Can anyone go through this code and find what is wrong with it..
i get error like
------------------------------------------------------------
An unhandled exception of type 'System.Management.ManagementException' occurred in system.management.dll

Additional information: Invalid parameter

------------------------------------------------
and error points to second line of given code..
 any help is appreciated...

-----------------------------------------
 Dim mgmntscp As New ObjectGetOptions
        Dim mc As New ManagementClass("root\\WMI", "MSNdis_80211_ServiceSetIdentifier", mgmntscp)
        Dim moc As ManagementObjectCollection
        moc = mc.GetInstances()

        For Each mo As ManagementObject In moc
            'Dim wlanCard As String = CType(mo("InstanceName"), String)
            Dim active As Boolean = CType(mo("Active"), Boolean)
            Dim ssid() As Byte = CType(mo("Ndis80211SsId"), Byte())
            Dim ssidString As String = System.Text.Encoding.ASCII.GetString(ssid)
            MsgBox(ssidString)
        Next mo


0
Comment
Question by:prashanth_gurijala
  • 4
  • 2
6 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 12221927
try
Dim mc As New ManagementClass("root\\WMI", "MSNdis_80211_ServiceSetIdentifier", null)
0
 

Author Comment

by:prashanth_gurijala
ID: 12222011
HI,

Its giving an error

WindowsApplication2\Form1.vb(48): 'null' is not declared. 'Null' constant is no longer supported; use 'System.DBNull' instead.

and i tried System.DBNull but it gives as

Visual Studio Projects\WindowsApplication2\Form1.vb(48): 'DBNull' is a type in 'System' and cannot be used as an expression.

also tried DBNull gets another error

thanx
prashanth
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 12222366
what is mo??
0
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 
LVL 48

Expert Comment

by:Mikal613
ID: 12222372
got it 4get it
0
 
LVL 48

Accepted Solution

by:
Mikal613 earned 500 total points
ID: 12222845
0
 

Author Comment

by:prashanth_gurijala
ID: 12233234
yeah i am back ffrom  exams.... hey i tried that link too in the beginining and i guess its in c # and i tried converting it into vb but no luck
I am not sure if i can manage C# as its been some 4 years back i was using VC++ .. can we compile that and include as a module i am not sure...
But any advice is appreciated...
thanx
-prashanth
0

Featured Post

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Cisco Air AP 6 59
What are acceptable WiFi signal strengths 6 72
Boosting Power of a Cisco Access Point 8 65
Wifi addin for wireshark? 5 30
Need WiFi? Often, there are perfectly good networks that don't have WiFi capability - and there's a need to add it.  - Perhaps you have an Ethernet port into a network but no WiFi nearby. - Perhaps you have a powerline extender and no WiFi at the…
In this article we have discussed about the OS X EI Capitan and how to fix Wi-Fi issue in OS X El Capitan. We have explained how to delete system level preferences and create a new Wi-Fi location to resolve Wi-Fi issue.
This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question