次の方法で共有


NdisAllocateCloneOidRequest (Compact 2013)

3/26/2014

This 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
    An NDIS handle that identifies a filter module or an intermediate driver's protocol binding.
  • Request
    A pointer to an existing NDIS_OID_REQUEST structure from which NDIS copies the information to the newly allocated structure.
  • 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.
  • CloneRequest
    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:

Value

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 did not 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

Header

ndis.h

See Also

Reference

NDIS OID Request Interface for Protocol Drivers
NDIS_OID_REQUEST
NdisFreeCloneOidRequest