Click here to Skip to main content
15,896,557 members

How to connect to access point using VB.NET?

Member 9366327 asked:

Open original thread
I have been searching the internet for weeks now.
Is there a way I can connect to a network/router/access point through VB.NET?
I don't really care if the program needs administrative privileges.
I have already made a program which lists the access points in range.
The purpose of my program is to, when in range of a BT Openzone or FON hotspot, to connect to it.
I am at the point where the program has found a access point in range.
Now, I am not that good with APIs, so please if you refer me to one can you give me more or less step by step instructions what to do with it (eg. put this file in the app directory, add a reference to this file)

Here is my current code:
VB
Private Function RetrieveNetworks()
Dim proc As New Process
proc.StartInfo.CreateNoWindow = True
proc.StartInfo.FileName = "netsh"
proc.StartInfo.Arguments = "wlan show networks mode=ssid"
proc.StartInfo.RedirectStandardOutput = True
proc.StartInfo.UseShellExecute = False
proc.Start()
Return (proc.StandardOutput.ReadToEnd())
proc.WaitForExit()


I have managed to filter the output so I get a perfectly clean list of SSIDS.
Any help and I would be very grateful.
Tags: Visual Basic, Internet, API, Connection

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900