![]() |
Re: WLan API Übersetztung ?
Viele Fehler waren es nicht.
Den Funktionstyp hast du nicht versucht zu konvertieren. "pointer to function" in C ist auch nicht so leicht zu verstehen fuer einen Delphi-Programmierer. Das mit dem {$MINENUMSIZE 4} hattest du auch etwas falsch verstanden. Das gilt von der ersten Anwendung bis zum Ende des Files. Ich habe sicherheitshalber in Konstanten und passende Typdeklaration umgewandelt. Das ist dann auch mit alten Delphi-Versionen kompatibel. An einer Stelle wurde BOOLEAN in Boolean konvertiert. Besser ist da ByteBool. An einer Stelle wurde faelschlich ein variant record benutzt. Die Kommentare habe ich nur teilweise eingesetzt. Generell gilt bei Jedi (genaugenommen sind das meine Regeln): Die Kommentare des Originals werden uebernommen. Nichts ist besser als das Original. Uebersetzungen koennen nur Fehler bringen. Die Spaltenformatierung bei Konstanten sollte erhalten werden. Bei Records gilt die Jedi-Formatierung nicht Spaltenformatierung. Alle Namen sollten unveraendert uebernommen werden. Das gilt insbesondere auch fuer die Gross/Kleinschreibung. Ausnahme bei Kollision mit reservierten Worten. Delphisierte Namen koennen zusaetzlich verwendet werden. Unbedingt die Tabulatoren durch Leerzeichen ersetzen. Es gibt noch viele weitere Regeln. Am besten Jedi-Apilib Files lesen. |
Re: WLan API Übersetztung ?
Zitat:
Nochmal Danke Robert Marquardt ! ^^ |
Re: WLan API Übersetztung ?
Hello
Sorry for English, but my German is very-very bad. First of all I wish to thank all people, who took part in translation WLan headers to Delphi, it's great work, I could not find even partial translation anywhere else. But when I has tried to use these headings, I have found, what not all works correctly. I have problems with getting of the status of wireless connections and when I looked headers, I have found, what not all identically with MSDN. In MSDN WLAN_AVAILABLE_NETWORK structure is described so:
Delphi-Quellcode:
But in headers it looks differently:
typedef struct _WLAN_AVAILABLE_NETWORK {
WCHAR strProfileName[256]; DOT11_SSID dot11Ssid; DOT11_BSS_TYPE dot11BssType; ULONG uNumberOfBssids; BOOL bNetworkConnectable; WLAN_REASON_CODE wlanNotConnectableReason; ULONG uNumberOfPhyTypes; DOT11_PHY_TYPE dot11PhyTypes[WLAN_MAX_PHY_TYPE_NUMBER]; BOOL bMorePhyTypes; WLAN_SIGNAL_QUALITY wlanSignalQuality; BOOL bSecurityEnabled; DOT11_AUTH_ALGORITHM dot11DefaultAuthAlgorithm; DOT11_CIPHER_ALGORITHM dot11DefaultCipherAlgorithm; DWORD dwFlags; DWORD dwReserved; } WLAN_AVAILABLE_NETWORK,
Delphi-Quellcode:
Differs even quantity of parametres, therefore I receive wrong values in many fields, for example in wlanSignalQuality and bSecurityEnabled.
WLAN_AVAILABLE_NETWORK = record
strProfileName: array [0..WLAN_MAX_NAME_LENGTH - 1] of WCHAR; dot11Ssid: DOT11_SSID; dot11BssType: DOT11_BSS_TYPE; uNumberOfBssids: ULONG; bNetworkConnectable: BOOL; wlanNotConnectableReason: WLAN_REASON_CODE; uDot11PhyType: ULONG; wlanSignalQuality: WLAN_SIGNAL_QUALITY; dot11RateSet: DOT11_RATE_SET; bSecurityEnabled: BOOL; dot11DefaultAuthAlgorithm: DOT11_AUTH_ALGORITHM; dot11DefaultCipherAlgorithm: DOT11_CIPHER_ALGORITHM; dwFlags: DWORD; dwReserved: DWORD; end; I tried to correct headers itself, but have failed. Maybe someone already have a corrected variant of headers or maybe I can download somewhere wlanapi.dll, which works correctly with current headers? Thanks in advance, Max. |
Re: WLan API Übersetztung ?
You are right. I will amend it ^^.
|
Re: WLan API Übersetztung ?
Zitat:
|
Re: WLan API Übersetztung ?
Hallo leute,
es hatt sich ein Problem aufgetan ... wie schon angesprochen hat sich was in den Header geändert. So also ich das nun beheben wollte, musste ich mit drinn feststellen das ich nicht die Aktuellen Header Dateien habe (ich weiß nicht was WLAN_MAX_PHY_TYPE_NUMBER für ne größe hat). Ich würde doch bitten das mir mal jemandt die Aktuellen Header (C++) Dateien Postet, ich schau mal weiter ich noch was finde. |
Re: WLan API Übersetztung ?
Zitat:
|
Re: WLan API Übersetztung ?
Na, geht's voran? :)
|
Re: WLan API Übersetztung ?
Wie meinst du das :-D ?
|
Re: WLan API Übersetztung ?
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:00 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz