WlanOpenHandle (wlanapi)
Last changed: -217.81.19.190

.
Summary
Gets a handle to the wireless LAN API for use in the other calls in the API.

C# Signature:

    [DllImport("Wlanapi.dll")]
    private static extern int WlanOpenHandle(
        uint dwClientVersion,
        IntPtr pReserved, //not in MSDN but required
        [Out] out uint pdwNegotiatedVersion,
        out IntPtr ClientHandle);

VB Signature:

    <DllImport("Wlanapi", EntryPoint := "WlanOpenHandle")> _
    Public Shared Function WlanOpenHandle(ByVal dwClientVersion As UInteger, ByVal pReserved As IntPtr, <Out> ByRef pdwNegotiatedVersion As UInteger, ByRef phClientHandle As IntPtr) As UInteger
    End Function

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

pReserved must be passed as IntPtr.Zero.

dwClientVersion must be 1 for Windows XP with SP3 and Wireless LAN API for Windows XP with SP2

or 2 for Windows Vista and Windows Server 2008

Tips & Tricks:

Please add some!

Sample Code:

See WlanQueryInterface.

Documentation