Thema: Delphi WLan API Übersetztung ?

Einzelnen Beitrag anzeigen

nitschchedu

Registriert seit: 24. Mär 2006
300 Beiträge
 
Delphi 7 Professional
 
#22

Re: WLan API Übersetztung ?

  Alt 19. Okt 2006, 16:22
Hier mal alle Typen

Delphi-Quellcode:

PnduDot11_SSID = ^TnduDot11_SSID;
  TnduDot11_SSID = record
    uSSIDLength: ULONG;
    ucSSID: array [0..NDU_DOT11_SSID_MAX_LENGTH] of UCHAR;
  end;

  TnduDot11_Mac_Address = record
    ucDot11MacAddress: array [0..6] of UCHAR;
  end;

  TnduDot11BssType = (dot11_BSS_type_infrastructure = 1,
    dot11_BSS_type_independent = 2,
    dot11_BSS_type_any = 3);

  TnduDot11PhyType = (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_IHV_start = $80000000,
    dot11_phy_type_IHV_end = $ffffffff);

  TnduWLanRateSet = record
    uRateSetLength: ULONG;
    usRateSet: array [0..NDU_DOT11_RATE_SET_MAX_LENGTH] of SHORT;
  end;

  TnduWLanBSSEntry = record
    dot11Ssid: TnduDot11_SSID;
    uPhyId: ULONG;
    dot11Bssid: TnduDot11_Mac_Address;
    dot11BssType: TnduDot11BssType;
    dot11BssPhyType: TnduDot11PhyType;
    lRssi: Longint;
    uLinkQuality: ULONG;
    bInRegDomain: Boolean;
    usBeaconPeriod: SHORT;
    ullTimestamp: LONGLONG;
    ullHostTimestamp: LONGLONG;
    usCapabilityInformation: SHORT;
    ulChCenterFrequency: ULONG;
    wlanRateSet: TnduWLanRateSet;
    ulIeOffset: ULONG;
    ulIeSize: ULONG;
  end;

  PnduWLanBSSList = ^TnduWLanBSSList;
  TnduWLanBSSList = record
    dwTotalSize: DWORD;
    dwNumberOfItems: DWORD;
    wlanBssEntries: TnduWLanBSSEntry;
  end;

Code:
#define DOT11_SSID_MAX_LENGTH  32      // 32 bytes
typedef struct _DOT11_SSID {
#ifndef __midl
    __range(0,32)
#endif
    ULONG uSSIDLength;
    UCHAR ucSSID[DOT11_SSID_MAX_LENGTH];
} DOT11_SSID, * PDOT11_SSID;


// These are needed for wlanapi.h for pre-longhorn targets
#ifdef __midl
    typedef struct _DOT11_MAC_ADDRESS {
        UCHAR ucDot11MacAddress[6];
    } DOT11_MAC_ADDRESS, * PDOT11_MAC_ADDRESS;
#else
    typedef UCHAR DOT11_MAC_ADDRESS[6];
    typedef DOT11_MAC_ADDRESS * PDOT11_MAC_ADDRESS;
#endif

#ifdef __midl
// use 4-byte enum
typedef [v1_enum] enum _DOT11_PHY_TYPE {
#else
typedef enum _DOT11_PHY_TYPE {
#endif
    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_IHV_start = 0x80000000,
    dot11_phy_type_IHV_end = 0xffffffff
} DOT11_PHY_TYPE, * PDOT11_PHY_TYPE;

#define DOT11_RATE_SET_MAX_LENGTH              126 // 126 bytes
typedef struct _DOT11_RATE_SET {
    ULONG uRateSetLength;
    __field_ecount_part(DOT11_RATE_SET_MAX_LENGTH, uRateSetLength) UCHAR ucRateSet[DOT11_RATE_SET_MAX_LENGTH];
} DOT11_RATE_SET, * PDOT11_RATE_SET;

typedef struct _WLAN_BSS_ENTRY {
    DOT11_SSID dot11Ssid;
    ULONG uPhyId;
    DOT11_MAC_ADDRESS dot11Bssid;
    DOT11_BSS_TYPE dot11BssType;
    DOT11_PHY_TYPE dot11BssPhyType;
    LONG lRssi;
    ULONG uLinkQuality;
    BOOLEAN bInRegDomain;
    USHORT usBeaconPeriod;
    ULONGLONG ullTimestamp;
    ULONGLONG ullHostTimestamp;
    USHORT usCapabilityInformation;
    ULONG ulChCenterFrequency;
    WLAN_RATE_SET wlanRateSet;
    // the beginning of the IE blob
    // the offset is w.r.t. the beginning of the entry
    ULONG ulIeOffset;
    // size of the IE blob
    ULONG ulIeSize;
} WLAN_BSS_ENTRY, * PWLAN_BSS_ENTRY;

// struct WLAN_VARIABLE_SIZE_ARRAY defines a list of entries,
// each of which may have different size
typedef struct _WLAN_BSS_LIST {
    // The total size of the data in BYTE
    DWORD dwTotalSize;
    DWORD dwNumberOfItems;
    WLAN_BSS_ENTRY wlanBssEntries[1];
} WLAN_BSS_LIST, *PWLAN_BSS_LIST;
So das waren eigentlich alle ! Ich hoffe du kannst mir Helfen.
  Mit Zitat antworten Zitat