WlanConnect (wlanapi)
Last changed: -223.72.64.170

.
Summary
TODO - a short description

C# Signature:

[DllImport("Wlanapi.dll", SetLastError = true)]
public static extern uint WlanConnect(IntPtr hClientHandle,ref Guid pInterfaceGuid,ref WLAN_CONNECTION_PARAMETERS pConnectionParameters,IntPtr pReserved);

VB Signature:

Declare Function WlanConnect Lib "wlanapi.dll" (ByVal hClientHandle As IntPtr, _
                         ByRef pInterfaceGuid As Guid, _
                         ByRef pConnectionParameters As WLAN_CONNECTION_PARAMETERS, _
                         ByVal pReserved As IntPtr) As UInteger

User-Defined Types:

WLAN_CONNECTION_PARAMETERS

Alternative Managed API:

Managed Wifi - http://managedwifi.codeplex.com/

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

C#:

WLAN_CONNECTION_PARAMETERS wlanConnectionParameters = new WLAN_CONNECTION_PARAMETERS();
wlanConnectionParameters.dot11BssType = DOT11_BSS_TYPE.dot11_BSS_type_any;
wlanConnectionParameters.dwFlags = 0;
wlanConnectionParameters.strProfile = "dlink";
wlanConnectionParameters.wlanConnectionMode = WLAN_CONNECTION_MODE.wlan_connection_mode_profile;
WlanConnect(ClientHandle,ref pInterfaceGuid,ref wlanConnectionParameters ,new IntPtr());

VB:

Dim wlanConnectionParameters As New WLAN_CONNECTION_PARAMETERS
wlanConnectionParameters.dot11BssType = DOT11_BSS_TYPE.dot11_BSS_type_any
wlanConnectionParameters.dwFlags = 0
wlanConnectionParameters.strProfile = "dlink"
wlanConnectionParameters.wlanConnectionMode = WLAN_CONNECTION_MODE.wlan_connection_mode_profile
WlanConnect(ClientHandle, pInterfaceGuid, wlanConnectionParameters, IntPtr.Zero)

Documentation
WlanConnect on MSDN