Bewerken

Delen via


OID_GEN_SUPPORTED_GUIDS

As a query, the OID_GEN_SUPPORTED_GUIDS OID requests the miniport driver to return an array of structures of the type NDIS_GUID.

Version Information

Windows Vista and later versions of Windows
Supported.

NDIS 6.0 and later miniport drivers
Optional.

NDIS 5.1 miniport drivers
Optional.

Windows XP
Supported.

NDIS 5.1 miniport drivers
Optional.

Remarks

Each structure in the array specifies the mapping of a custom GUID (globally unique identifier) to either a custom OID or to an NDIS_STATUS that the miniport driver sends through the NdisMIndicateStatusEx function.

The NDIS_GUID structure is defined as follows:

typedef struct _NDIS_GUID {
    GUID             Guid;
    union {
        NDIS_OID     Oid;
        NDIS_STATUS  Status;
    };
    ULONG            Size;
    ULONG            Flags;
} NDIS_GUID, *PNDIS_GUID;

The members of this structure contain the following information:

Guid
Specifies the custom GUID defined for the miniport driver.

Oid
Specifies the custom OID to which Guid maps.

Status
Specifies the NDIS_STATUS to which Guid maps.

Size
Specifies the size in bytes of each data item in the array returned by the miniport driver. If the fNDIS_GUID_ANSI_STRING or fNDIS_GUID_NDIS_STRING flag is set, Size is set to -1. Otherwise, Size specifies the size in bytes of the data item that the GUID represents. This member is specified only when the fNDIS_GUID_ARRAY flag is set.

Flags
The following flags can be combined by the OR operator to indicate whether the GUID maps to an OID or to an NDIS_STATUS string and to indicate the type of data that is supplied for the GUID:

fNDIS_GUID_TO_OID
Indicates that the NDIS_GUID structure maps a GUID to an OID.

fNDIS_GUID_TO_STATUS
Indicates that the NDIS_GUID structure maps a GUID to an NDIS_STATUS string.

fNDIS_GUID_ANSI_STRING
Indicates that a null-terminated ANSI string is supplied for the GUID.

fNDIS_GUID_UNICODE_STRING
Indicates that a Unicode string is supplied for the GUID.

fNDIS_GUID_ARRAY
Indicates that an array of data items is supplied for the GUID. The specified Size indicates the length of each data item in the array.

fNDIS_GUID_ALLOW_READ
When set, indicates that all users are allowed to use this GUID to obtain information.

fNDIS_GUID_ALLOW_WRITE
When set, indicates that all users are allowed to use this GUID to set information.

Note   By default, custom WMI GUIDs supplied by a miniport driver are only accessible to users with administrator privileges. A user with administrator privileges can always read or write to a custom GUID if the miniport driver supports the read or write operation for that GUID. Set the fNDIS_GUID_ALLOW_READ and fNDIS_GUID_ALLOW_WRITE flags to allow all users to access a custom GUID.

Note that all custom GUIDs registered by a miniport driver must set either fNDIS_GUID_TO_OID or fNDIS_GUID_TO_STATUS (never set both). All other flags may be combined by using the OR operator as applicable.

In the following example, an NDIS_GUID structure maps a GUID to OID_802_3_MULTICAST_LIST:

NDIS_GUID    NdisGuid = {{0x44795701, 0xa61b, 0x11d0, 0x8d, 0xd4,
                          0x00, 0xc0, 0x4f, 0xc3,
                          0x35, 0x8c},
                          OID_802_3_MULTICAST_LIST,
                          6,
                          fNDIS_GUID_TO_OID | fNDIS_GUID_ARRAY};

A GUID is an identifier used by Windows Management Instrumentation (WMI) to obtain or set information. NDIS intercepts a GUID sent by WMI to an NDIS driver, it maps the GUID to an OID, and sends the OID to the driver. The driver returns the data items to NDIS, which then returns the data to WMI.

NDIS also translates changes in NIC status into GUIDs that are recognized by WMI. When a miniport driver reports a change in NIC status using the NdisMIndicateStatusEx function, NDIS translates the NDIS_STATUS indicated by the miniport driver into a GUID that NDIS sends to WMI.

If a miniport driver supports customs GUIDs, it must support OID_GEN_SUPPORTED_GUIDS. This OID returns to NDIS the mapping of custom GUIDs to custom OIDs or NDIS_STATUS strings. After querying the miniport driver using OID_GEN_SUPPORTED_GUIDS, NDIS registers the miniport driver's custom GUIDs with WMI.

Requirements

Header

Ntddndis.h (include Ndis.h)

See also

NdisMIndicateStatusEx