IWDFUsbTargetDevice::RetrieveDeviceInformation method (wudfusb.h)

[Warning: UMDF 2 is the latest version of UMDF and supersedes UMDF 1. All new UMDF drivers should be written using UMDF 2. No new features are being added to UMDF 1 and there is limited support for UMDF 1 on newer versions of Windows 10. Universal Windows drivers must use UMDF 2. For more info, see Getting Started with UMDF.]

The RetrieveDeviceInformation method retrieves device information of the specified type.

Syntax

HRESULT RetrieveDeviceInformation(
  [in]      ULONG InformationType,
  [in, out] ULONG *BufferLength,
  [out]     PVOID Buffer
);

Parameters

[in] InformationType

The type of information that the UMDF driver requests about the device.

[in, out] BufferLength

A pointer to a variable that, on input, contains the size, in bytes, of the buffer that RetrieveDeviceInformation supplies in Buffer. On output, this parameter contains the size that RetrieveDeviceInformation requires for Buffer.

[out] Buffer

A pointer that receives the buffer that contains the device information.

Return value

RetrieveDeviceInformation returns one of the following values:

Return code Description
S_OK

RetrieveDeviceInformation successfully retrieved the device information.

E_OUTOFMEMORY

RetrieveDeviceInformation encountered an allocation failure.

An error code that is defined in Winerror.h
This value corresponds to the error code that the WinUsb API returned.

Remarks

For information about valid information types that a UMDF driver can pass for the InformationType parameter, see the WinUsb_QueryDeviceInformation function.

If InformationType is DEVICE_SPEED (0x01), on successful return, Buffer indicates the operating speed of the device. 0x03 indicates high-speed or higher; 0x01 indicates full-speed or lower.

The RetrieveDeviceInformation method generates a UMDF request and synchronously sends the request to the I/O target.

Examples

For a code example of how to use theRetrieveDeviceInformation method, see IWDFUsbTargetPipe::SetPipePolicy.

Requirements

Requirement Value
End of support Unavailable in UMDF 2.0 and later.
Target Platform Desktop
Minimum UMDF version 1.5
Header wudfusb.h (include Wudfusb.h)
DLL WUDFx.dll

See also

IWDFUsbTargetDevice

WinUsb_QueryDeviceInformation