信息
您所需的主题如下所示。但此主题未包含在此库中。

WdfChildListRetrieveAddressDescription 方法

The WdfChildListRetrieveAddressDescription method locates a child device that has a specified identification description and retrieves the device's address description.

语法

NTSTATUS WdfChildListRetrieveAddressDescription(
  [in]       WDFCHILDLIST ChildList,
  [in]       PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription,
  [in, out]  PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
);

参数

ChildList [in]

A handle to a child list object.

IdentificationDescription [in]

A pointer to a caller-allocated WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER structure that identifies a driver-supplied child identification description.

AddressDescription [in, out]

A pointer to a WDF_CHILD_ADDRESS_DESCRIPTION_HEADER structure that identifies a child address description. The framework fills in this description.

返回值

WdfChildListRetrieveAddressDescription returns STATUS_SUCCESS, or another status value for which NT_SUCCESS(status) equals TRUE, if the operation succeeds. Otherwise, this method might return one of the following values:

返回代码说明
STATUS_INVALID_PARAMETER

An input parameter was invalid.

STATUS_NO_SUCH_DEVICE

No device matched the specified identification description.

STATUS_INVALID_DEVICE_REQUEST

The child list did not contain address descriptions, or the size of the address description that AddressDescription specified was incorrect.

 

This method might also return other NTSTATUS values.

A system bug check occurs if the driver supplies an invalid object handle.

评论

For more information about child lists, see Dynamic Enumeration.

示例

The following code example searches a child list for a child device whose identification description contains the value that is specified by SomeValue. If WdfChildListRetrieveAddressDescription locates the device, it retrieves the device's address description.

MY_IDENTIFICATION_DESCRIPTION  id;
MY_ADDRESS_DESCRIPTION  addrDescrip;

WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER_INIT(
                                                 &id.Header,
                                                 sizeof(id)
                                                 );
WDF_CHILD_ADDRESS_DESCRIPTION_HEADER_INIT(
                                          &addrDescrip.Header,
                                          sizeof(addrDescrip)
                                          );

id.DeviceIdentifier = SomeValue;
status = WdfChildListRetrieveAddressDescription(
                                                list,
                                                &idDescrip.Header,
                                                &addrDescrip.Header
                                                );
if (!NT_SUCCESS(status) {
    return status;
}

要求

版本

Available in version 1.0 and later versions of KMDF.

标头

Wdfchildlist.h (包括Wdf.h)

Wdf<MajorVersionNumber>000.sys (see Framework Library Versions.)

IRQL

<= DISPATCH_LEVEL

另请参见

WDF_CHILD_ADDRESS_DESCRIPTION_HEADER
WDF_CHILD_ADDRESS_DESCRIPTION_HEADER_INIT
WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER
WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER_INIT

 

 

社区附加资源

显示:
© 2014 Microsoft