ALLOCATE_SHARED_MEMORY_HANDLER callback function

The NetAllocateSharedMemory function (ALLOCATE_SHARED_MEMORY_HANDLER entry point) is called by NDIS when a driver allocates shared memory from a shared memory provider.

Syntax

ALLOCATE_SHARED_MEMORY_HANDLER AllocateSharedMemoryHandler;

NDIS_STATUS AllocateSharedMemoryHandler(
  NDIS_HANDLE ProviderContext,
  PNDIS_SHARED_MEMORY_PARAMETERS SharedMemoryParameters,
  PNDIS_HANDLE pSharedMemoryProviderContext
)
{...}

Parameters

ProviderContext

An NDIS_HANDLE to a block of driver-allocated context information that identifies the provider. The provider supplied this information in the ProviderContext member of the NDIS_SHARED_MEMORY_PROVIDER_CHARACTERISTICS structure.

SharedMemoryParameters

A pointer to an NDIS_SHARED_MEMORY_PARAMETERS structure that defines the requested attributes for the shared memory.

pSharedMemoryProviderContext

A pointer to a handle for a shared memory context area. The shared memory provider provides a handle that identifies the shared memory that it allocated.

Return Value

NetAllocateSharedMemory can return the following status values:

Return code Description
NDIS_STATUS_SUCCESS
The operation completed successfully.
NDIS_STATUS_RESOURCES
The operation failed because there were insufficient resources to complete the operation.
NDIS_STATUS_INVALID_PARAMETER
The operation failed because of an invalid input parameter.
NDIS_STATUS_FAILURE
The operation failed for unspecified reasons.

Remarks

NDIS calls the NetAllocateSharedMemory function of a shared memory provider when a driver calls the NdisAllocateSharedMemory function.

The shared memory provider specified the entry point (ALLOCATE_SHARED_MEMORY_HANDLER) for NetAllocateSharedMemory in the NDIS_SHARED_MEMORY_PROVIDER_CHARACTERISTICS structure.

Requirements

   
Minimum supported client Supported in NDIS 6.20 and later.
Target Platform Desktop
Header ndis.h (include Ndis.h)
IRQL PASSIVE_LEVEL

See Also

NDIS_SHARED_MEMORY_PARAMETERS

NDIS_SHARED_MEMORY_PROVIDER_CHARACTERISTICS

NdisAllocateSharedMemory