NdisMGetDeviceProperty (NDIS 5.1) function

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

NdisMGetDeviceProperty retrieves device objects required to set up communication with a miniport driver through a bus driver.

Syntax

VOID NdisMGetDeviceProperty(
  _In_    NDIS_HANDLE       MiniportAdapterHandle,
  _Inout_ PDEVICE_OBJECT    *PhysicalDeviceObject,
  _Inout_ PDEVICE_OBJECT    *FunctionalDeviceObject,
  _Inout_ PDEVICE_OBJECT    *NextDeviceObject,
  _Inout_ PCM_RESOURCE_LIST *AllocatedResources,
  _Inout_ PCM_RESOURCE_LIST *AllocatedResourcesTranslated
);

Parameters

  • MiniportAdapterHandle [in]
    Specifies the NDIS handle that identifies the miniport driver's NIC. This handle was originally passed to MiniportInitialize.

  • PhysicalDeviceObject [in, out]
    Pointer to a caller-allocated buffer. The buffer receives a pointer to a DEVICE_OBJECT structure that represents the physical device for the miniport driver. This pointer is optional.

  • FunctionalDeviceObject [in, out]
    Pointer to a caller-allocated buffer. The buffer receives a pointer to a DEVICE_OBJECT structure. DEVICE_OBJECT represents the functional device object that NDIS creates for the physical device. This pointer is optional.

  • NextDeviceObject [in, out]
    Pointer to a caller-allocated buffer. The buffer receives a pointer to a DEVICE_OBJECT structure that represents the next device object. This next device object is preceded in the chain by the functional device object that belongs to the miniport driver. NDIS creates this functional device object for the physical device. For example, the next device object could be the object that is associated with a bus driver or HAL This pointer is optional.

  • AllocatedResources [in, out]
    Pointer to a caller-allocated buffer thatreceives a pointer to a CM_RESOURCE_LIST structure. CM_RESOURCE_LIST describes a list of hardware resources that the PnP manager assigns to the physical device. This list contains the resources in raw form, that is, not translated by HAL. This pointer is optional.

  • AllocatedResourcesTranslated [in, out]
    Pointer to a caller-allocated buffer that receives a pointer to a CM_RESOURCE_LIST structure. CM_RESOURCE_LIST describes a list of hardware resources that the PnP manager assigns to the physical device. This list contains the resources in translated form, that is, translated by HAL. This pointer is optional.

Return value

None

Remarks

Miniport drivers must retrieve specific information to set up their communications. Miniport drivers for miniport instances that communicate through bus drivers use NdisMGetDeviceProperty to retrieve this information. For example, miniport driver instances that attach to Universal Serial Bus (USB) or IEEE 1394 buses require miniport drivers that expose a standard NDIS miniport driver interface at their upper edge, and use the class interface for the particular bus at their lower edge. To use the USB or 1394 class interface, a miniport driver creates and submits I/O Request Packets (IRPs). The miniport driver uses the physical and next-device objects that NdisMGetDeviceProperty retrieves to submit IRPs to the class interface for a particular bus. To locate more information about creating and submitting IRPs to bus drivers, see Handling IRPs.

Pointers to DEVICE_OBJECT for the physical, functional, and next device objects that NdisMGetDeviceProperty retrieves are simply handles that are opaque to the miniport driver.

Typically, miniport drivers call the NdisMQueryAdapterResources function and pass a pointer to an NDIS_RESOURCE_LIST structure to obtain a list of hardware resources for their NICs. The NDIS_RESOURCE_LIST structure is equivalent to the CM_PARTIAL_RESOURCE_LIST structure on Windows 2000 and later platforms. Alternatively, miniport drivers can call NdisMGetDeviceProperty to retrieve pointers to "raw" or "translated" resources. Raw resources have not been translated by HAL; translated resources have been. To locate more information about raw and translated resources, see Plug and Play.

Note that if a Microsoft Windows 95/98/Me miniport driver requests a pointer to either raw or translated resources, NDIS sets the AllocatedResources and AllocatedResourcesTranslated parameters to NULL.

Requirements

Target platform

Universal

Version

See NdisMGetDeviceProperty.

Header

Ndis.h (include Ndis.h)

Library

Ndis.lib

IRQL

PASSIVE_LEVEL

See also

MiniportInitialize

NdisMQueryAdapterResources

 

 

Send comments about this topic to Microsoft