Microsoft Windows CE 3.0  

MiniportSetInformation

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

MiniportSetInformationis a required function that allows bound protocol drivers (or NDIS) to request changes in the state information that the miniport maintains for particular OIDs, such as changes in multicast addresses.

NDIS_STATUS
MiniportSetInformation(
IN NDIS_HANDLE
MiniportAdapterContext
,
IN NDIS_OID
Oid
,
IN PVOID
InformationBuffer
,
IN ULONG
InformationBufferLength
,
OUT PULONG
BytesRead
,
OUT PULONG
BytesNeeded
);

Parameters

MiniportAdapterContext
Specifies the handle to a miniport-allocated context area in which the driver maintains per-network adapter state, set up by MiniportInitialize.
Oid
Specifies the system-defined OID_ XXXcode designating the set operation the driver should carry out.
InformationBuffer
Points to a buffer containing the OID-specific data used by MiniportSetInformationfor the set.
InformationBufferLength
Specifies the number of bytes at InformationBuffer.
BytesRead
Points to a variable that MiniportSetInformationsets to the number of bytes it read from the buffer at InformationBuffer.
BytesNeeded
Points to a variable that MiniportSetInformationsets to the number of additional bytes it needs to satisfy the request if InformationBufferLengthis less than Oidrequires.

Return Values

MiniportSetInformationcan return one of the following:

NDIS_STATUS_SUCCESS
MiniportSetInformationused the data at InformationBufferto set itself or its network adapter to the state required by the given Oid, and it set the variable at BytesReadto the amount of supplied data it used.
NDIS_STATUS_PENDING
The driver will complete the request asynchronously with a call to NdisMSetInformationCompletewhen it has set itself or its network adapter to the state requested.
NDIS_STATUS_INVALID_OID
MiniportSetInformationdid not recognize the Oid.
NDIS_STATUS_INVALID_LENGTH
The InformationBufferLengthdoes not match the length required by the given Oid. MiniportSetInformationreturned how many bytes the buffer should be at BytesNeeded.
NDIS_STATUS_INVALID_DATA
The data supplied at InformationBufferwas invalid for the given Oid.
NDIS_STATUS_NOT_ACCEPTED
MiniportSetInformationattempted the requested set operation on the network adapter but was unsuccessful.
NDIS_STATUS_NOT_SUPPORTED
MiniportSetInformationdoes not support the Oid, which is optional.
NDIS_STATUS_RESOURCES
MiniportSetInformationcould 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.

Comments

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

If MiniportSetInformationreturns 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 NDIS or the caller of NdisRequest, whichever allocated the memory.

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.

MiniportSetInformationcan be pre-empted by an interrupt.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Ndis.h   Ndislib.lib
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

MiniportInitialize, NdisMSetInformationComplete, NdisRequest