NdisMFreeSharedMemory (Windows CE 5.0)
This function frees memory that was previously allocated by NdisMAllocateSharedMemory by the driver of a bus master DMA NIC.
VOID NdisMFreeSharedMemory(NDIS_HANDLE MiniportAdapterHandle,ULONG Length,BOOLEAN Cached,PVOID VirtualAddress,NDIS_PHYSICAL_ADDRESS PhysicalAddress);
Parameters
- MiniportAdapterHandle
[in] Specifies the handle originally input to MiniportInitialize. - Length
[in] Specifies the number of bytes originally allocated. - Cached
[in] Specifies TRUE if the original allocation was cacheable. - VirtualAddress
[in] Specifies the base virtual address returned by NdisMAllocateSharedMemory. - PhysicalAddress
[in] Specifies the corresponding physical address returned by NdisMAllocateSharedMemory.
Return Values
None.
Remarks
If the NIC driver of a bus master DMA device has already made a successful call to NdisMAllocateSharedMemory, it will call NdisMFreeSharedMemory if any of the following occurs:
- Its MiniportInitialize function is unable to initialize the NIC, so this function must release all existing claims on hardware resources for that NIC before it returns control.
- The NIC for which the miniport allocated the memory is being removed.
- The driver is being unloaded either because the system is shutting down or because the user reconfigured the network components used in the machine.
A miniport cannot call NdisMFreeSharedMemory to free a subrange within an allocated shared memory range. The parameters passed to NdisMFreeSharedMemory must match exactly those that were passed to NdisMAllocateSharedMemory.
NdisMFreeSharedMemory cannot be called from a MiniportShutdown function.
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: Ndis.h.
Link Library: Ndis.dll.
See Also
MiniportInitialize | MiniportShutdown | NdisMAllocateSharedMemory
Send Feedback on this topic to the authors