digitalmars.D.announce - wlanapi.h
- =?UTF-8?B?0JLQuNGC0LDQu9C40Lkg0KTQsNC0?= =?UTF-8?B?0LXQtdCy?= (154/154) Apr 14 2020 I was writed "wlanapi.h".
- Petar Kirov [ZombineDev] (9/13) Apr 14 2020 The best way to go is to contribute your Windows API declarations
I was writed "wlanapi.h". It is WLAN API windows header. I will be happy to see it in public D distributive. What I must to do for it ? What I must to do for add new file to "C:\D\dmd2\src\druntime\src\core\sys\windows\" ? Where to send it ? // cat import core.sys.windows.windows; enum UINT WLAN_MAX_NAME_LENGTH = 256; enum UINT DOT11_SSID_MAX_LENGTH = 32; enum UINT WLAN_MAX_PHY_TYPE_NUMBER = 8; enum UINT WLAN_AVAILABLE_NETWORK_CONNECTED = 1; enum UINT WLAN_AVAILABLE_NETWORK_HAS_PROFILE = 2; struct WLAN_PROFILE_INFO { WCHAR[WLAN_MAX_NAME_LENGTH] strProfileName; DWORD dwFlags; }; alias WLAN_PROFILE_INFO* PWLAN_PROFILE_INFO; struct WLAN_PROFILE_INFO_LIST { DWORD dwNumberOfItems; DWORD dwIndex; WLAN_PROFILE_INFO[1] ProfileInfo; }; alias WLAN_PROFILE_INFO_LIST* PWLAN_PROFILE_INFO_LIST; enum WLAN_INTERFACE_STATE { wlan_interface_state_not_ready = 0, wlan_interface_state_connected, wlan_interface_state_ad_hoc_network_formed, wlan_interface_state_disconnecting, wlan_interface_state_disconnected, wlan_interface_state_associating, wlan_interface_state_discovering, wlan_interface_state_authenticating }; alias WLAN_INTERFACE_STATE* PWLAN_INTERFACE_STATE; struct WLAN_INTERFACE_INFO { GUID InterfaceGuid; WCHAR[WLAN_MAX_NAME_LENGTH] strInterfaceDescription; WLAN_INTERFACE_STATE isState; }; alias WLAN_INTERFACE_INFO* PWLAN_INTERFACE_INFO; struct WLAN_INTERFACE_INFO_LIST { DWORD dwNumberOfItems; DWORD dwIndex; WLAN_INTERFACE_INFO[1] InterfaceInfo; }; alias WLAN_INTERFACE_INFO_LIST* PWLAN_INTERFACE_INFO_LIST; struct DOT11_SSID { ULONG uSSIDLength; UCHAR[DOT11_SSID_MAX_LENGTH] ucSSID; }; alias DOT11_SSID* PDOT11_SSID; enum DOT11_BSS_TYPE { dot11_BSS_type_infrastructure = 1, dot11_BSS_type_independent = 2, dot11_BSS_type_any = 3 }; alias DOT11_BSS_TYPE* PDOT11_BSS_TYPE; enum DOT11_PHY_TYPE { dot11_phy_type_unknown = 0, dot11_phy_type_any = dot11_phy_type_unknown, dot11_phy_type_fhss = 1, dot11_phy_type_dsss = 2, dot11_phy_type_irbaseband = 3, dot11_phy_type_ofdm = 4, dot11_phy_type_hrdsss = 5, dot11_phy_type_erp = 6, dot11_phy_type_ht = 7, }; alias DOT11_PHY_TYPE* PDOT11_PHY_TYPE; enum DOT11_AUTH_ALGORITHM { DOT11_AUTH_ALGO_80211_OPEN = 1, DOT11_AUTH_ALGO_80211_SHARED_KEY = 2, DOT11_AUTH_ALGO_WPA = 3, DOT11_AUTH_ALGO_WPA_PSK = 4, DOT11_AUTH_ALGO_WPA_NONE = 5, DOT11_AUTH_ALGO_RSNA = 6, DOT11_AUTH_ALGO_RSNA_PSK = 7, }; alias DOT11_AUTH_ALGORITHM* PDOT11_AUTH_ALGORITHM; enum DOT11_CIPHER_ALGORITHM { DOT11_CIPHER_ALGO_NONE = 0x00, DOT11_CIPHER_ALGO_WEP40 = 0x01, DOT11_CIPHER_ALGO_TKIP = 0x02, DOT11_CIPHER_ALGO_CCMP = 0x04, DOT11_CIPHER_ALGO_WEP104 = 0x05, DOT11_CIPHER_ALGO_WPA_USE_GROUP = 0x100, DOT11_CIPHER_ALGO_RSN_USE_GROUP = 0x100, DOT11_CIPHER_ALGO_WEP = 0x101, }; alias DOT11_CIPHER_ALGORITHM* PDOT11_CIPHER_ALGORITHM; struct WLAN_AVAILABLE_NETWORK { WCHAR[WLAN_MAX_NAME_LENGTH] strProfileName; DOT11_SSID dot11Ssid; DOT11_BSS_TYPE dot11BssType; ULONG uNumberOfBssids; BOOL bNetworkConnectable; DWORD wlanNotConnectableReason; ULONG uNumberOfPhyTypes; DOT11_PHY_TYPE[WLAN_MAX_PHY_TYPE_NUMBER] dot11PhyTypes; BOOL bMorePhyTypes; ULONG wlanSignalQuality; BOOL bSecurityEnabled; DOT11_AUTH_ALGORITHM dot11DefaultAuthAlgorithm; DOT11_CIPHER_ALGORITHM dot11DefaultCipherAlgorithm; DWORD dwFlags; DWORD dwReserved; }; alias WLAN_AVAILABLE_NETWORK* PWLAN_AVAILABLE_NETWORK; struct WLAN_AVAILABLE_NETWORK_LIST { DWORD dwNumberOfItems; DWORD dwIndex; WLAN_AVAILABLE_NETWORK[1] Network; }; alias WLAN_AVAILABLE_NETWORK_LIST* PWLAN_AVAILABLE_NETWORK_LIST; extern ( Windows ) { DWORD WlanDeleteProfile ( HANDLE, const GUID*, LPCWSTR, PVOID ); DWORD WlanSetProfile ( HANDLE, const GUID*, DWORD, LPCWSTR, LPCWSTR, BOOL, PVOID, PDWORD ); DWORD WlanGetProfile ( HANDLE, const GUID*, LPCWSTR, PVOID, LPWSTR*, DWORD*, DWORD* ); DWORD WlanOpenHandle ( DWORD, PVOID, PDWORD, PHANDLE ); DWORD WlanCloseHandle ( HANDLE, PVOID ); DWORD WlanGetProfileList ( HANDLE, const GUID*, PVOID, PWLAN_PROFILE_INFO_LIST * ); DWORD WlanGetAvailableNetworkList ( HANDLE, const GUID *, DWORD, PVOID, PWLAN_AVAILABLE_NETWORK_LIST * ); DWORD WlanEnumInterfaces ( HANDLE, PVOID, PWLAN_INTERFACE_INFO_LIST * ); void WlanFreeMemory ( PVOID ); DWORD WlanReasonCodeToString ( DWORD, DWORD, PWCHAR, PVOID ); DWORD WlanSetProfilePosition ( HANDLE, const GUID *, LPCWSTR, DWORD, PVOID ); }
Apr 14 2020
On Tuesday, 14 April 2020 at 09:42:44 UTC, Виталий Фадеев wrote:I was writed "wlanapi.h". It is WLAN API windows header. I will be happy to see it in public D distributive. [...]The best way to go is to contribute your Windows API declarations to the upstream Druntime project: https://github.com/dlang/druntime/tree/master/src/core/sys/windows To do that, you can follow these guides: - https://github.com/dlang/druntime/blob/master/CONTRIBUTING.md - https://wiki.dlang.org/Starting_as_a_Contributor P.S. Please use the Learn or Announce groups for questions like this.
Apr 14 2020