NdisMFreeSharedMemory (Windows Embedded CE 6.0)
1/6/2010
This function frees memory that was previously allocated by NdisMAllocateSharedMemory by the driver of a bus master DMA NIC.
Syntax
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 Value
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 MiniportShutdownfunction.
Requirements
Header | ndis.h |
Library | ndis.dll |
Windows Embedded CE | Windows CE .NET 4.0 and later |
See Also
Reference
NDIS Library Functions
MiniportInitialize
MiniportShutdown
NdisMAllocateSharedMemory