NdisAllocateCloneOidRequest function

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_  NDIS_HANDLE       SourceHandle,
  _In_  PNDIS_OID_REQUEST Request,
  _In_  UINT              PoolTag,
  _Out_ PNDIS_OID_REQUEST *CloneRequest
);

Parameters

SourceHandle [in]

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

Request [in]

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

PoolTag [in]

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.

CloneRequest [out]

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 codeDescription
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

Target platform

Desktop

Version

Supported in NDIS 6.0 and later.

Header

Ndis.h (include Ndis.h)

Library

Ndis.lib

IRQL

<= DISPATCH_LEVEL

DDI compliance rules

Irql_OID_Function

See also

NDIS_OID_REQUEST
NdisFreeCloneOidRequest

 

 

Send comments about this topic to Microsoft

Show: