IPort::GetDeviceProperty method

The GetDeviceProperty method provides simplified access to device properties that are contained in the registry for Plug and Play devices.

Syntax


NTSTATUS GetDeviceProperty(
  [in]  DEVICE_REGISTRY_PROPERTY DeviceRegistryProperty,
  [in]  ULONG                    BufferLength,
  [out] PVOID                    PropertyBuffer,
  [out] PULONG                   ReturnLength
);

Parameters

DeviceRegistryProperty [in]

Identifies the particular device property that the caller is requesting. The valid values for this parameter are the same as those that are defined for the IoGetDeviceProperty call's DeviceProperty parameter.

BufferLength [in]

Specifies the length in bytes of the buffer that is to receive the requested information.

PropertyBuffer [out]

Pointer to the property buffer. This parameter points to a caller-allocated buffer into which the method writes the requested property information. The buffer must be large enough to contain the number of bytes specified in BufferLength.

ReturnLength [out]

Output pointer to the length of the returned data. This parameter points to a caller-allocated ULONG variable into which the method writes a count specifying the number of bytes actually written to the PropertyBuffer buffer. If the buffer is too small to contain the information, however, the method instead outputs the required buffer size.

Return value

GetDeviceProperty returns STATUS_SUCCESS if the call was successful. Otherwise, the method returns an appropriate error code. If the property buffer provided by the caller is too small, the method will return STATUS_BUFFER_TOO_SMALL and output the needed size in ReturnLength.

Remarks

This method retrieves the audio adapter's device properties. It is similar in operation to the PcGetDeviceProperty function, except that it automatically retrieves the device properties of the audio adapter rather than requiring a device object to explicitly specify a target device.

Requirements

Target platform

Universal

Header

Portcls.h (include Portcls.h)

IRQL

PASSIVE_LEVEL

See also

IoGetDeviceProperty
PcGetDeviceProperty

 

 

Send comments about this topic to Microsoft

Show: