ALLOCATE_SHARED_MEMORY_HANDLER callback function (ndis.h)
The NetAllocateSharedMemory function (ALLOCATE_SHARED_MEMORY_HANDLER entry point) is called by NDIS when a driver allocates shared memory from a shared memory provider.
ALLOCATE_SHARED_MEMORY_HANDLER AllocateSharedMemoryHandler;
NDIS_STATUS AllocateSharedMemoryHandler(
[in] NDIS_HANDLE ProviderContext,
[in] PNDIS_SHARED_MEMORY_PARAMETERS SharedMemoryParameters,
[in, out] PNDIS_HANDLE pSharedMemoryProviderContext
)
{...}
[in] 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.
[in] SharedMemoryParameters
A pointer to an NDIS_SHARED_MEMORY_PARAMETERS structure that defines the requested attributes for the shared memory.
[in, out] 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.
NetAllocateSharedMemory can return the following status values:
Return code | Description |
---|---|
|
The operation completed successfully. |
|
The operation failed because there were insufficient resources to complete the operation. |
|
The operation failed because of an invalid input parameter. |
|
The operation failed for unspecified reasons. |
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.
Requirement | Value |
---|---|
Minimum supported client | Supported in NDIS 6.20 and later. |
Target Platform | Desktop |
Header | ndis.h (include Ndis.h) |
IRQL | PASSIVE_LEVEL |