Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "WLAN_INTERFACE_INFO" in [All]

wlanapi

.

WLAN_INTERFACE_INFO_LIST

.

Guid pInterfaceGuid = ((WLAN_INTERFACE_INFO)wlanInterfaceInfoList.InterfaceInfo[0]).InterfaceGuid;

.

        WLAN_INTERFACE_INFO_LIST infoList = new WLAN_INTERFACE_INFO_LIST(ptr);

.

     Dim infoList As New WLAN_INTERFACE_INFO_LIST(ptr)

Structures

.

       public struct WLAN_INTERFACE_INFO_LIST

.

        public WLAN_INTERFACE_INFO[] InterfaceInfo;

.

        /// Constructor for WLAN_INTERFACE_INFO_LIST.

.

        public WLAN_INTERFACE_INFO_LIST(IntPtr pList)

.

        // The first 4 bytes are the number of WLAN_INTERFACE_INFO structures.

.

        // Construct the array of WLAN_INTERFACE_INFO structures.

.

        InterfaceInfo = new WLAN_INTERFACE_INFO[dwNumberOfItems];

.

            // The length of the WLAN_INTERFACE_INFO structure is 532 bytes - this

.

            // was determined by doing a Marshall.SizeOf(WLAN_INTERFACE_INFO)

.

            // Construct the WLAN_INTERFACE_INFO structure, marshal the unmanaged

.

            InterfaceInfo[i] = (WLAN_INTERFACE_INFO)Marshal.PtrToStructure(pItemList, typeof(WLAN_INTERFACE_INFO));

.

    Private Structure WLAN_INTERFACE_INFO_LIST

.

    Public InterfaceInfo As WLAN_INTERFACE_INFO()

.

        ' The first 4 bytes are the number of WLAN_INTERFACE_INFO structures.

.

        ' Construct the array of WLAN_INTERFACE_INFO structures.

.

        InterfaceInfo = New WLAN_INTERFACE_INFO(dwNumberofItems - 1) {}

.

        ' The length of the WLAN_INTERFACE_INFO structure is 532 bytes - this

.

        ' was determined by doing a Marshall.SizeOf(WLAN_INTERFACE_INFO)

.

        ' Construct the WLAN_INTERFACE_INFO structure, marshal the unmanaged

.

        InterfaceInfo(i) = DirectCast(Marshal.PtrToStructure(pItemList, GetType(WLAN_INTERFACE_INFO)), WLAN_INTERFACE_INFO)

.

WLAN_INTERFACE_INFO

.

The constructor of this structure "unmarshal" WLAN_INTERFACE_INFO_LIST data obtained by calling WlanEnumInterfaces(). This is a good example on how to marshal pointer-to-pointer case in C++ world ( kind of confusing because in C# or Managed Environment more broadly, it is just reference, so as you can see from the implementation for C#, it is to be treated like just a single pointer case. Also, this example shows how to handle an array for the InterfaceInfo inside of this structure. It needs two level of marshaling and this example shows that.

.
Documentation
[WLAN_INTERFACE_INFO_LIST] on MSDN
.

       public struct WLAN_INTERFACE_INFO_LIST

.

        public WLAN_INTERFACE_INFO[] InterfaceInfo;

.

        /// Constructor for WLAN_INTERFACE_INFO_LIST.

.

        public WLAN_INTERFACE_INFO_LIST(IntPtr pList)

.

        // The first 4 bytes are the number of WLAN_INTERFACE_INFO structures.

.

        // Construct the array of WLAN_INTERFACE_INFO structures.

.

        InterfaceInfo = new WLAN_INTERFACE_INFO[dwNumberofItems];

.

            // The length of the WLAN_INTERFACE_INFO structure is 532 bytes - this

.

            // was determined by doing a Marshall.SizeOf(WLAN_INTERFACE_INFO)

.

            // Construct the WLAN_INTERFACE_INFO structure, marshal the unmanaged

.

            InterfaceInfo[i] = (WLAN_INTERFACE_INFO)Marshal.PtrToStructure(pItemList, typeof(WLAN_INTERFACE_INFO));

.

    Private Structure WLAN_INTERFACE_INFO_LIST

.

    Public InterfaceInfo As WLAN_INTERFACE_INFO()

.

        ' The first 4 bytes are the number of WLAN_INTERFACE_INFO structures.

.

        ' Construct the array of WLAN_INTERFACE_INFO structures.

.

        InterfaceInfo = New WLAN_INTERFACE_INFO(dwNumberofItems - 1) {}

.

        ' The length of the WLAN_INTERFACE_INFO structure is 532 bytes - this

.

        ' was determined by doing a Marshall.SizeOf(WLAN_INTERFACE_INFO)

.

        ' Construct the WLAN_INTERFACE_INFO structure, marshal the unmanaged

.

        InterfaceInfo(i) = DirectCast(Marshal.PtrToStructure(pItemList, GetType(WLAN_INTERFACE_INFO)), WLAN_INTERFACE_INFO)

.

WLAN_INTERFACE_INFO

.

The constructor of this structure "unmarshal" WLAN_INTERFACE_INFO_LIST data obtained by calling WlanEnumInterfaces(). This is a good example on how to marshal pointer-to-pointer case in C++ world ( kind of confusing because in C# or Managed Environment more broadly, it is just reference, so as you can see from the implementation for C#, it is to be treated like just a single pointer case. Also, this example shows how to handle an array for the InterfaceInfo inside of this structure. It needs two level of marshaling and this example shows that.

.
Documentation
[WLAN_INTERFACE_INFO_LIST] on MSDN

 
Access PInvoke.net directly from VS: