Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than wlanapi, prefix the name with the module name and a period.
WLAN_RADIO_STATE (wlanapi)
.
C# Signature:
private struct WLAN_RADIO_STATE
{
public UInt32 dwNumberOfPhys;
public WLAN_PHY_RADIO_STATE[] PhyRadioState;
public WLAN_RADIO_STATE(IntPtr ppData)
{
// The first 4 bytes are the number of WLAN_PHY_RADIO_STATE structures.
dwNumberOfPhys = Marshal.ReadInt32(ppData, 0);
// Construct the array of WLAN_PHY_RADIO_STATE structures.
PhyRadioState = new WLAN_PHY_RADIO_STATE[dwNumberOfPhys];
for (int i = 0; i <= dwNumberOfPhys - 1; i++) {
// The offset of the array of structures is 4 bytes past the beginning.
// Then, take the index and multiply it by the number of bytes in the
// structure. The length of the WLAN_PHY_RADIO_STATE structure is 12 bytes
IntPtr pPhyList = new IntPtr(ppData.ToInt64() + (i * 12) + 4);
// Construct the WLAN_PHY_RADIO_STATE structure, marshal the unmanaged
// structure into it, then copy it to the array of structures.
PhyRadioState[i] = (WLAN_PHY_RADIO_STATE)Marshal.PtrToStructure(pPhyList, typeof(WLAN_PHY_RADIO_STATE));
}
}
Private Structure WLAN_RADIO_STATE
Public dwNumberOfPhys As UInt32
Public PhyRadioState As WLAN_PHY_RADIO_STATE()
Public Sub New(ppData As IntPtr)
' The first 4 bytes are the number of WLAN_PHY_RADIO_STATE structures.
dwNumberOfPhys = Marshal.ReadInt32(ppData, 0)
' Construct the array of WLAN_PHY_RADIO_STATE structures.
PhyRadioState = New WLAN_PHY_RADIO_STATE(dwNumberOfPhys - 1) {}
For i As Integer = 0 To dwNumberOfPhys - 1
' The offset of the array of structures is 4 bytes past the beginning.
' Then, take the index and multiply it by the number of bytes in the
' structure. The length of the WLAN_PHY_RADIO_STATE structure is 12 bytes
Dim pPhyList As New IntPtr(ppData.ToInt64() + (i * 12) + 4)
' Construct the WLAN_PHY_RADIO_STATE structure, marshal the unmanaged
' structure into it, then copy it to the array of structures.
PhyRadioState(i) = DirectCast(Marshal.PtrToStructure(pPhyList, GetType(WLAN_PHY_RADIO_STATE)), WLAN_PHY_RADIO_STATE)
Next
End Sub
End Structure
User-Defined Types:
None.
Alternative Managed API:
Do you know one? Please contribute it!
Notes:
None.
Tips & Tricks:
Please add some!
Sample Code:
Please add some!
TODO - a short description
3/16/2007 8:17:31 AM - -63.69.129.2
Click to read this page
4/6/2008 7:23:14 AM - anonymous
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).