Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function sets up driver access to device I/O ports with the NdisRawReadPort XXXand NdisRawWritePort XXXfunctions and claims the range of I/O port addresses in the registry for that driver's NIC.
NDIS_STATUS NdisMRegisterIoPortRange( OUT PVOID * PortOffset , IN NDIS_HANDLE MiniportAdapterHandle , IN UINT InitialPort , IN UINT NumberOfPorts );
Parameters
Return Values
Returns one of the following:
Remarks
An NIC driver calls this function from its MiniportInitializefunction. MiniportInitializemust call NdisMSetAttributesor NdisMSetAttributesExbefore calling this function.
This function maps a bus-relative device address range that the miniport can use subsequently to access an I/O port range on its NIC by calling the NdisRaw XXXfunctions. A successful call claims the specified range of I/O ports in the registry for the caller's NIC.
Because the parameters passed to the NdisRaw XXX have been mapped, these functions run significantly faster than the corresponding NdisImmediate XXXPort XXX. After a successful call to this function, a miniport cannot call any of the NdisImmediate XXXPort XXXfunctions with either bus-relative addresses or mapped virtual addresses within such an I/O port range.
If its call to this function fails, MiniportInitializereleases all resources that it has already allocated for its NIC, and then fails initialization for that NIC.
Drivers of NICs with device registers in the host memory space call NdisMMapIoSpaceand, subsequently, the NdisRead/WriteRegister XXXfunctions to access the NIC registers.
A driver that calls this function runs at IRQL PASSIVE_LEVEL.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 2.0 and later | Ndis.h |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
NdisMDeregisterIoPortRange, NdisMMapIoSpace, NdisRawReadPortBufferUchar, NdisRawReadPortBufferUlong, NdisRawReadPortBufferUshort, NdisRawReadPortUchar, NdisRawReadPortUlong, NdisRawReadPortUshort, NdisRawWritePortUchar, NdisRawWritePortUlong, NdisRawWritePortUshort
Last updated on Tuesday, July 13, 2004