Expand Minimize

WdfDeviceAllocAndQueryInterfaceProperty method

[Applies to UMDF only]

The WdfDeviceAllocAndQueryInterfaceProperty method allocates a buffer and retrieves a specified device interface property.

Syntax


NTSTATUS WdfDeviceAllocAndQueryInterfaceProperty(
  [in]            WDFDEVICE Device,
  [in]            PWDF_DEVICE_INTERFACE_PROPERTY_DATA PropertyData,
  [in]            POOL_TYPE PoolType,
  [in, optional]  PWDF_OBJECT_ATTRIBUTES PropertyMemoryAttributes,
  [out]           WDFMEMORY PropertyMemory,
  [out]           PDEVPROPTYPE Type
);

Parameters

Device [in]

A handle to a framework device object.

PropertyData [in]

A pointer to a WDF_DEVICE_INTERFACE_PROPERTY_DATA structure that identifies the device interface property to be retrieved.

PoolType [in]

A POOL_TYPE-typed enumerator that specifies the type of memory to be allocated.

PropertyMemoryAttributes [in, optional]

A pointer to a caller-allocated WDF_OBJECT_ATTRIBUTES structure that describes object attributes for the memory object that the function will allocate. This parameter is optional and can be WDF_NO_OBJECT_ATTRIBUTES.

PropertyMemory [out]

A pointer to a WDFMEMORY-typed location that receives a handle to a framework memory object.

Type [out]

A pointer to a DEVPROPTYPE-typed variable that, on return, identifies the type of property data contained in PropertyMemory.

Return value

If the WdfDeviceAllocAndQueryInterfaceProperty method encounters no errors, it returns STATUS_SUCCESS. Additional return values include:

Return codeDescription
STATUS_INVALID_PARAMETER

One of the parameters is incorrect.

 

The method might return other NTSTATUS values.

Remarks

The WdfDeviceAllocAndQueryInterfaceProperty method determines the amount of memory that is necessary to hold the requested device interface property. It allocates enough memory to hold the data, and returns a handle to a framework memory object that describes the allocated memory. To access the data, your driver can call WdfMemoryGetBuffer.

For information about related methods, see Accessing the Unified Device Property Model.

Requirements

Minimum support

Windows 8.1

Minimum UMDF version

2.0

Header

Wdfdevice.h (include Wdf.h)

Library

WUDFx02000.dll

IRQL

PASSIVE_LEVEL

See also

WDF_DEVICE_INTERFACE_PROPERTY_DATA
WDF_DEVICE_INTERFACE_PROPERTY_DATA_INIT
WdfDeviceAssignInterfaceProperty
WdfDeviceQueryInterfaceProperty

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft. All rights reserved.