Bewerken

Delen via


NdisMGetDeviceProperty function (ndis.h)

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

Syntax

void NdisMGetDeviceProperty(
  [in]            NDIS_HANDLE       MiniportAdapterHandle,
  [out, optional] PDEVICE_OBJECT    *PhysicalDeviceObject,
  [out, optional] PDEVICE_OBJECT    *FunctionalDeviceObject,
  [out, optional] PDEVICE_OBJECT    *NextDeviceObject,
  [out, optional] PCM_RESOURCE_LIST *AllocatedResources,
  [out, optional] PCM_RESOURCE_LIST *AllocatedResourcesTranslated
);

Parameters

[in] MiniportAdapterHandle

The NDIS handle that identifies the miniport adapter. This handle was originally passed to the MiniportInitializeEx function.

[out, optional] PhysicalDeviceObject

A pointer to a caller-allocated buffer. The buffer receives a pointer to a DEVICE_OBJECT structure that represents the physical device for the miniport adapter. This pointer is optional.

[out, optional] FunctionalDeviceObject

A 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.

[out, optional] NextDeviceObject

A 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.

[out, optional] AllocatedResources

A 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 raw form, that is, not translated by HAL. This pointer is optional.

[out, optional] AllocatedResourcesTranslated

A 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.

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.

Requirements

Requirement Value
Minimum supported client Supported in NDIS 5.1, and NDIS 6.0 and later. For NDIS 5.1 drivers, see NdisMGetDeviceProperty (NDIS 5.1).
Target Platform Universal
Header ndis.h (include Ndis.h)
Library Ndis.lib
IRQL PASSIVE_LEVEL
DDI compliance rules Irql_Miniport_Driver_Function(ndis)

See also

DEVICE_OBJECT

MiniportInitializeEx