Freigeben über


MiniportSetInformation (Windows CE 5.0)

Send Feedback

This function is a required function that allows bound protocol drivers, or NDIS, to request changes in the state information that the miniport maintains for particular object identifiers, such as changes in multicast addresses.

NDIS_STATUSMiniportSetInformation(NDIS_HANDLEMiniportAdapterContext,NDIS_OIDOid,PVOIDInformationBuffer,ULONGInformationBufferLength,PULONG BytesRead,PULONGBytesNeeded);

Parameters

  • MiniportAdapterContext
    [in] Specifies the handle to a miniport-allocated context area in which the driver maintains per-network adapter state, set up by MiniportInitialize.
  • Oid
    [in] Specifies the system-defined OID_XXX code designating the set operation the driver should carry out.
  • InformationBuffer
    [in] Points to a buffer containing the OID-specific data used by MiniportSetInformation for the set.
  • InformationBufferLength
    [in] Specifies the number of bytes at InformationBuffer.
  • BytesRead
    [out] Points to a variable that MiniportSetInformation sets to the number of bytes it read from the buffer at InformationBuffer.
  • BytesNeeded
    [out] Points to a variable that MiniportSetInformation sets to the number of additional bytes it needs to satisfy the request if InformationBufferLength is less than Oid requires.

Return Values

The following table shows the status values that MiniportSetInformation can return.

Value Description
NDIS_STATUS_SUCCESS MiniportSetInformation used the data at InformationBuffer to set itself or its network adapter to the state required by the given Oid,and it set the variable at BytesRead to the amount of supplied data it used.
NDIS_STATUS_PENDING The driver will complete the request asynchronously with a call to NdisMSetInformationComplete when it has set itself or its network adapter to the state requested.
NDIS_STATUS_INVALID_OID MiniportSetInformation did not recognize the Oid.
NDIS_STATUS_INVALID_LENGTH The InformationBufferLength does not match the length required by the given Oid. MiniportSetInformation returned how many bytes the buffer should be at BytesNeeded.
NDIS_STATUS_INVALID_DATA The data supplied at InformationBuffer was invalid for the given Oid.
NDIS_STATUS_NOT_ACCEPTED MiniportSetInformation attempted the requested set operation on the network adapter but was unsuccessful.
NDIS_STATUS_NOT_SUPPORTED MiniportSetInformation does not support the Oid, which is optional.
NDIS_STATUS_RESOURCES MiniportSetInformation could not carry out the requested operation due to resource constraints. This return value does not necessarily mean that the same request, submitted at a later time, will be failed for the same reason.

Remarks

NDIS calls MiniportSetInformation either on its own behalf, such as to manage bindings to the miniport, or when a bound protocol driver calls NdisRequest.

If MiniportSetInformation returns NDIS_STATUS_PENDING, the driver must complete the request later by calling NdisMSetInformationComplete. Until it completes any request, the miniport can safely access the memory at InformationBuffer, BytesRead, and BytesNeeded. After the miniport completes any set request, ownership of these variables and the buffer reverts to the driver that allocated the memory, NDIS or the caller of NdisRequest.

After a call to MiniportSetInformation, NDIS submits no other requests to the driver until it has completed the operation, either synchronously or asynchronously. Instead, NDIS holds requests queued until the current set operation is completed.

MiniportSetInformation can be pre-empted by an interrupt.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Externs.h.

See Also

MiniportInitialize | NdisMSetInformationComplete | NdisRequest

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.