Bewerken

Delen via


NdisAllocateCloneOidRequest function (ndis.h)

The NdisAllocateCloneOidRequest function allocates memory for a new NDIS_OID_REQUEST structure and copies all the information from an existing NDIS_OID_REQUEST structure to the newly allocated structure.

Syntax

NDIS_STATUS NdisAllocateCloneOidRequest(
  [in] IN NDIS_HANDLE        SourceHandle,
       IN PNDIS_OID_REQUEST  OidRequest,
  [in] IN UINT               PoolTag,
       OUT PNDIS_OID_REQUEST *ClonedOidRequest
);

Parameters

[in] SourceHandle

An NDIS handle that identifies a filter module or an intermediate driver's protocol binding.

OidRequest

A pointer to an existing NDIS_OID_REQUEST structure from which NDIS copies the information to the newly allocated structure.

[in] PoolTag

A kernel pool tag. The tag is a string, delimited by single quotation marks, with as many as four characters, usually specified in reverse order.

ClonedOidRequest

A pointer to a pointer to an NDIS_OID_REQUEST structure. If NDIS returns NDIS_STATUS_SUCCESS, NDIS provides a pointer to the new, cloned NDIS_OID_REQUEST structure; otherwise, NDIS sets the pointer value to NULL.

Return value

NdisAllocateClonedRequest can return one of the following status values:

Return code Description
NDIS_STATUS_SUCCESS
NDIS successfully allocated an NDIS_OID_REQUEST structure. The CloneRequest parameter contains a pointer to the NDIS_OID_REQUEST structure.
NDIS_STATUS_INVALID_PARAMETER
The allocation request failed because the NDIS handle specified at SourceHandle is not valid.
NDIS_STATUS_RESOURCES
The allocation request failed because NDIS did not have sufficient resources to complete the allocation request.
NDIS_STATUS_FAILURE
The driver failed to allocate the cloned structure for reasons other than those in the preceding list.

Remarks

To forward a request down to the underlying drivers, an NDIS intermediate driver or filter driver must call NdisAllocateCloneOidRequest to allocate a cloned NDIS_OID_REQUEST structure. A filter driver or intermediate driver should not forward the original NDIS_OID_REQUEST structure to underlying drivers.

NdisAllocateCloneOidRequest allocates new memory and copies the data from an existing NDIS_OID_REQUEST structure to the new structure.

The driver must subsequently call the NdisFreeCloneOidRequest function to free the NDIS_OID_REQUEST structure.

Requirements

Requirement Value
Minimum supported client Supported in NDIS 6.0 and later.
Target Platform Desktop
Header ndis.h (include Ndis.h)
Library Ndis.lib
IRQL <= DISPATCH_LEVEL
DDI compliance rules Irql_OID_Function(ndis)

See also

NDIS_OID_REQUEST

NdisFreeCloneOidRequest