Hi,
I am writing a program that can read the SSID from a wireless miniport
driver, but the NDIS_802_11_SSID structure and
MSNdis_80211_ServiceSetIdentifier MOF class let me confused. They are
as follows.
ntddndis.h:
typedef struct _NDIS_802_11_SSID
{
ULONG SsidLength; // length of SSID field below, in
bytes;
// this can be zero.
UCHAR Ssid[32]; // SSID information field
} NDIS_802_11_SSID, *PNDIS_802_11_SSID;
wmicore.mof:
class MSNdis_80211_ServiceSetIdentifier : MSNdis
{
...
[
read, write,
Description("SSID string") : amended,
WmiDataId(1)] uint8 Ndis80211SsId[33];
};
The length of NDIS_802_11_SSID is 36 bytes, but that of Ndis80211SsId
is just 33 bytes. The inconsistency caused that the beginning 4 bytes
in Ndis80211SsId[] maps to the SsidLength attribute of
NDIS_802_11_SSID and, therefore, only 29 bytes of Ssid attribute of
NDIS_802_11_SSID are copied to the rest buffer of Ndis80211SsId[].
Also, I can see the same result by running wbemtest.exe(on XP
SP1/SP2). Is my .mof file too old? Please advise. Thanks.
Best regards,
David