Delphi-PRAXiS
Seite 6 von 8   « Erste     456 78      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi WLan API Übersetztung ? (https://www.delphipraxis.net/79162-wlan-api-uebersetztung.html)

Robert Marquardt 14. Jan 2007 12:24

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.

nitschchedu 14. Jan 2007 13:41

Re: WLan API Übersetztung ?
 
Zitat:

Zitat von CodeX
Eine kurze Frage: Beim Download der WlanAPi.dll von MS kann man dies für unterschiedliche Sprachen machen. Sollte man hier die Sprache des Betriebssystems (deutsch wegen Kompatibilität) wählen oder die des zu entwickelnden Programms (englisch wegen Fehlermeldungen)?

Also ich habe sie mir in Deutsch rundergeladen das macht bei der DLL kein Unterschied.

Nochmal Danke Robert Marquardt ! ^^

MaxVol 10. Aug 2007 14:39

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:
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,
But in headers it looks differently:

Delphi-Quellcode:
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;
Differs even quantity of parametres, therefore I receive wrong values in many fields, for example in wlanSignalQuality and bSecurityEnabled.
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.

nitschchedu 12. Aug 2007 13:11

Re: WLan API Übersetztung ?
 
You are right. I will amend it ^^.

MaxVol 13. Aug 2007 13:51

Re: WLan API Übersetztung ?
 
Zitat:

Zitat von nitschchedu
You are right. I will amend it ^^.

Many thanks!

nitschchedu 26. Aug 2007 18:58

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.

Florian H 26. Aug 2007 20:37

Re: WLan API Übersetztung ?
 
Zitat:

Zitat von nitschchedu
Das Bsp Programm kommt noch, aber erst wenn das Pro-Wiki von mir und meinen Kumpels steht.

wie siehts eigentlich damit aus?

CodeX 24. Okt 2007 18:53

Re: WLan API Übersetztung ?
 
Na, geht's voran? :)

nitschchedu 27. Okt 2007 18:06

Re: WLan API Übersetztung ?
 
Wie meinst du das :-D ?

Florian H 27. Okt 2007 19:12

Re: WLan API Übersetztung ?
 
Zitat:

Zitat von nitschchedu
[...]
Also erstmal viel Spass beim lesen und weiteres würd folgen ;-)



Alle Zeitangaben in WEZ +1. Es ist jetzt 17:00 Uhr.
Seite 6 von 8   « Erste     456 78      

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