ALLOCATE_SHARED_MEMORY_HANDLER - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ndis.h

ALLOCATE_SHARED_MEMORY_HANDLER AllocateSharedMemoryHandler;

NDIS_STATUS AllocateSharedMemoryHandler(
  [in]      NDIS_HANDLE ProviderContext,
  [in]      PNDIS_SHARED_MEMORY_PARAMETERS SharedMemoryParameters,
  [in, out] PNDIS_HANDLE pSharedMemoryProviderContext
)
{...}

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-ndis-allocate_shared_memory_handler)

ALLOCATE_SHARED_MEMORY_HANDLER callback function

Description

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

Parameters

ProviderContext [in]

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 [in]

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

pSharedMemoryProviderContext [in, out]

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.

See also

NDIS_SHARED_MEMORY_PARAMETERS

NDIS_SHARED_MEMORY_PROVIDER_CHARACTERISTICS

NdisAllocateSharedMemory