次の方法で共有


NDIS_VAR_DATA_DESC

Many of these OIDs have associated structures with members of type NDIS_VAR_DATA_DESC, defined as follows:

typedef struct  _NDIS_VAR_DATA_DESC {
  USHORT  Length;  // number of bytes of data in buffer
  USHORT  MaximumLength; // total size of buffer in bytes 
  LONG    Offset;  // offset in bytes, relative to struct
} NDIS_VAR_DATA_DESC, *PNDIS_VAR_DATA_DESC;

This structure defines a type used to describe buffer space relative to the base virtual address of the NDIS_VAR_DATA_DESC structure itself. In other words, a pointer to a buffer is not explicitly provided by this type; only the offset to the buffer space is provided. Because this descriptor does not use an actual pointer, a user-mode application can allocate a buffer together with its descriptor of this type and provide an offset to this buffer relative to the base virtual address of the descriptor. This allows structures containing these descriptors to be passed between user mode and kernel mode without address mapping. Note that the buffer and the NDIS_VAR_DATA_DESC structure might or might not be contiguous because the specified offset might point to storage that the protocol or application allocated elsewhere. An Offset specified between zero and sizeof(NDIS_VAR_DATA_DESC)is invalid.

Queries that return information of type NDIS_VAR_DATA_DESC should null terminate buffers (that is, set the Offset member of this structure to NULL) and return zero as the buffer size if the requested information is unavailable. For example, if the revision number of the software/firmware in the device is unknown, a wireless WAN miniport driver should return zero for the Lengthand NULL for the Offset at SWVersionNum for an OID_WW_GEN_DEVICE_INFO query.

The definition of each OID_WW_GEN_XXX that follows describes the data type at InformationBufferin the NDIS_REQUESTstructure passed in to the underlying miniport driver.

Note   These OIDs are not available for use beginning with Windows Vista.

 

 

 

Send comments about this topic to Microsoft