[StructLayout(LayoutKind.Sequential,CharSet=CharSet.Unicode)]
public struct WLAN_CONNECTION_PARAMETERS
{
public WLAN_CONNECTION_MODE wlanConnectionMode;
public string strProfile;
public DOT11_SSID[] pDot11Ssid;
public DOT11_BSSID_LIST[] pDesiredBssidList;
public DOT11_BSS_TYPE dot11BssType;
public uint dwFlags;
}
VB Definition:
Structure WLAN_CONNECTION_PARAMETERS
Public TODO
End Structure
The history of this shows that IntPtrs for pDot11Ssid and pDesiredBssidList were changed to DOT11_SSID[] and DOT11_LIST[]. Then it should have some kind of explanation about the reason.
I think whether to use IntPtr or DOT11_SSID[] etc should be determined by which one you want, "Marshal" or "UnMarshal".
The rationale behind the change in the history for this is because is that he/she wanted to "unmarshal". However, in functions like WlanConnect(), it is used as an "input". So, it needs to be marshaled. Then I believe they should be IntPtr.
Also, DOT11_SSID[] looks to be wrong. It is to point one "SSID" not a series of SSID.
Also, it would be great if it explains how to marshal ucSSID in DOT11, because the ucSSID is just ANSI string ( without the terminating '\0'. )
Defines the mode of connection.
11/5/2008 7:03:32 PM - anonymous
Contains the SSID of an interface.
11/5/2008 7:08:23 PM - anonymous
TODO - a short description
1/22/2014 8:27:15 AM - -130.225.243.84
Defines a basic service set (BSS) network type.
10/8/2009 12:53:09 PM - -174.130.71.133
An IntPtr is a pointer to a memory location (unmanaged) that adapts to the platform it is running on (64-bit, etc.) UNLIKE a standard int/Integer. You should always use this type for unmanaged calls that require it, even though an int will appear to work on your development machine.
1/13/2008 4:00:13 AM - Damon Carr-72.43.165.29
An IntPtr is a pointer to a memory location (unmanaged) that adapts to the platform it is running on (64-bit, etc.) UNLIKE a standard int/Integer. You should always use this type for unmanaged calls that require it, even though an int will appear to work on your development machine.
1/13/2008 4:00:13 AM - Damon Carr-72.43.165.29
An IntPtr is a pointer to a memory location (unmanaged) that adapts to the platform it is running on (64-bit, etc.) UNLIKE a standard int/Integer. You should always use this type for unmanaged calls that require it, even though an int will appear to work on your development machine.