I got a PM asking for some code on the wireless Im using. I will post it here. I did NOT make the entire code I found it some where on the internet looking for some bits and pieces of random code to add to my project, and adapted it for VB6.
Code:
Private Sub wifitimer_Timer()
Dim objSwbemServices, colInstances, obj, rawssid, ssid, i, decval
On Error Resume Next
Set objSwbemServices = GetObject("winmgmts:\\.\root\wmi")
Set colInstances = objSwbemServices.ExecQuery("SELECT * FROM MSNDis_80211_BSSIList")
For Each obj In colInstances
If Left(obj.InstanceName, 4) <> "WAN " And Right(obj.InstanceName, 8) <> "Miniport" Then
For Each rawssid In obj.Ndis80211BSSIList
ssid = ""
For i = 0 To UBound(rawssid.Ndis80211Ssid)
decval = rawssid.Ndis80211Ssid(i)
If (decval > 31 And decval < 127) Then
ssid = ssid & Chr(decval)
End If
Next
wifilist.AddItem (ssid)
Dim A%, B%
For A% = 0 To wifilist.ListCount - 1
For B% = 0 To wifilist.ListCount - 1
If B% <> A% Then
If wifilist.List(A%) = wifilist.List(B%) Then
wifilist.RemoveItem B%
B% = B% - 1
End If
End If
Next B%
Next A%
Next
End If
Next
End Sub
Was the code that I put in a listbox and removes duplicates. Help with that came from (Ninja Monkey).
http://files.archaicbinary.net/Waynibu.zip <-- VB6 Source With textbox. Pulls duplicates from WMI. Would be great if no duplicates were pulled.
http://files.archaicbinary.net/Project1.exe <-- Compiled program.
http://files.archaicbinary.net/GPSV77K.DLL <-- Required DLL file for GPS functions. (Place in Windows folder, you can delete anytime you want, it does popup when you first run the program to say its unregistered, but works as a quick gps for now)
http://files.archaicbinary.net/Waynibu_Listbox.zip <-- VB6 Source with Listbox instead of Textbox. Pulls duplicates from WMI then removes them on the fly. This is the current one Im using. There is a compiled version included in the zip.